Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TDirectory
Inherited By:
None.
Purpose:
This class provides a surrogate object for a file system volume.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Do not derive from this class.
Concurrency:
Not multithread safe. This is a handle class.
Resource Use:
No special requirements.
Member Function: TVolume::GetFreeSpace
virtual FileSystemEntitySize GetFreeSpace () const
Interface Category:
API.
Purpose:
Returns the amount of free space on a TVolume.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The free disk space on a TVolume, in bytes.
Exceptions:
Throws TFileSystemObjectInvalid if the entity is uninitialized.
Throws TFileSystemEntityNotAvailable if the entity cannot be found.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
Member Function: TVolume::GetTotalSpace
virtual FileSystemEntitySize GetTotalSpace () const
Interface Category:
API.
Purpose:
Returns the total space on a TVolume.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The total space on a TVolume.
Exceptions:
Throws TFileSystemObjectInvalid if the entity is uninitialized.
Throws TFileSystemEntityNotAvailable if the entity cannot be found.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
Member Function: TVolume::MakeTemporaryDirectory
virtual TDirectory MakeTemporaryDirectory (const TFileSystemEntityName & directoryName, const TPropertySet & initialProperties =kNoProperties, FileSystemEntitySize initialMemberCount =0)
Interface Category:
API.
Purpose:
Creates a temporary directory, for example, one that is not guaranteed to survive a reboot.
Calling Context:
Call this function directly.
Parameters:
- const TFileSystemEntityName & directoryName -The name of the temporary directory.
- const TPropertySet & initialProperties =kNoProperties -The set of properties to use in the creation.
- FileSystemEntitySize initialMemberCount =0 -The new directory should preallocate this many slots for members. (This is a hint, not a requirement.)
Return Value:
Returns a TDirectory representing the new temporary directory.
Exceptions:
Throws TFileSystemObjectInvalid if the entity is uninitialized.
Throws TFileSystemEntityNotAvailable if the entity cannot be found.
Throws TFileSystemEntityAlreadyExists if a directory with the specified name already exists.
Throws TFileSystemAccessDenied if the caller is not privileged to create a temporary directory.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
Member Function: TVolume::MakeUniqueTemporaryDirectory
virtual TDirectory MakeUniqueTemporaryDirectory (const TPropertySet & initialProperties =kNoProperties, FileSystemEntitySize initialMemberCount =0)
Interface Category:
API.
Purpose:
Creates a temporary directory (not guaranteed to survive a reboot) with a generated name that is guaranteed to be unique.
Calling Context:
Call this function directly.
Parameters:
- const TPropertySet & initialProperties =kNoProperties -The set of properties to use when creating the directory.
- FileSystemEntitySize initialMemberCount =0 -The new directory should preallocate this many slots for members. (This is a hint, not a requirement.)
Return Value:
Returns a TDirectory representing the new temporary directory.
Exceptions:
Throws TFileSystemObjectInvalid if the entity is uninitialized.
Throws TFileSystemEntityNotAvailable if the entity cannot be found.
Throws TFileSystemAccessDenied if the caller is not privileged to create a temporary directory.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
Member Function: TVolume::MakeTemporaryFile
virtual TFile MakeTemporaryFile (const TFileSystemEntityName & fileName, const TPropertySet & initialProperties =kNoProperties, FileSystemEntitySize initialFileSize =0)
Interface Category:
API.
Purpose:
Creates a temporary file, a file that is not guaranteed to survive a reboot.
Calling Context:
Call this function directly.
Parameters:
- const TFileSystemEntityName & fileName -The name of the temporary file.
- const TPropertySet & initialProperties =kNoProperties -The set of properties to use when creating the file.
- FileSystemEntitySize initialFileSize =0 -The size of the storage to preallocate for the file. (This is a hint, not a requirement.)
Return Value:
Returns a TFile representing the new temporary file.
Exceptions:
Throws TFileSystemObjectInvalid if the entity is uninitialized.
Throws TFileSystemEntityNotAvailable if the entity cannot be found.
Throws TFileSystemEntityAlreadyExists if a file with the specified name already exists.
Throws TFileSystemAccessDenied if the caller is not privileged to create a temporary file.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
Member Function: TVolume::MakeUniqueTemporaryFile
virtual TFile MakeUniqueTemporaryFile (const TPropertySet & initialProperties =kNoProperties, FileSystemEntitySize initialFileSize =0)
Interface Category:
API.
Purpose:
Creates a temporary file (a file that is not guaranteed to survive a reboot) with a name that is guaranteed to be unique.
Calling Context:
Call this function directly.
Parameters:
- const TPropertySet & initialProperties =kNoProperties -The set of properties to use when creating the file.
- FileSystemEntitySize initialFileSize =0 -The size of the storage to preallocate for the file. (This is a hint, not a requirement.)
Return Value:
Returns a TFile representing the new temporary file.
Exceptions:
Throws TFileSystemObjectInvalid if the entity is uninitialized.
Throws TFileSystemEntityNotAvailable if the entity cannot be found.
Throws TFileSystemAccessDenied if the caller is not privileged to create a temporary file.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
virtual ~ TVolume ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
Member Function: TVolume::operator=
- TVolume & operator =(const TVolume & right)
- TVolume & operator =(const TFileSystemEntity & right)
Interface Category:
API.
Purpose:
- Assignment operator.
- Downcast special assignment operator.
Calling Context:
- Called when an object is assigned to another compatible object.
- Called when an object is assigned to another compatible object.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
- Throws no exceptions, passes all exceptions through.
- Throws TFileSystemTypeMismatch if TFileSystemEntity & right is not a TDirectory.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
- TVolume ()
- TVolume (const TVolume & copy)
- TVolume (const TFileSystemEntity & copy)
Calling Context:
- Called by the stream-in operators and anyone for fillin.
- Called to copy an object.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
- Throws no exceptions, passes all exceptions through.
- Throws no exceptions, passes all exceptions through.
- Throws TFileSystemTypeMismatch if the types are different.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.