Class: TVolume

Declaration: FileSystemInterface.h

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:

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:

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:

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:

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.

Member Function: TVolume::~TVolume

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=

  1. TVolume & operator =(const TVolume & right)
  2. TVolume & operator =(const TFileSystemEntity & right)

Interface Category:

API.

Purpose:

  1. Assignment operator.
  2. Downcast special assignment operator.

Calling Context:

  1. Called when an object is assigned to another compatible object.
  2. Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

  1. Throws no exceptions, passes all exceptions through.
  2. Throws TFileSystemTypeMismatch if TFileSystemEntity & right is not a TDirectory.

Concurrency:

Not multithread safe. This is a handle class.

Other Considerations:

None.

Member Function: TVolume::TVolume

  1. TVolume ()
  2. TVolume (const TVolume & copy)
  3. TVolume (const TFileSystemEntity & copy)

Calling Context:

  1. Called by the stream-in operators and anyone for fillin.
  2. Called to copy an object.
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

  1. Throws no exceptions, passes all exceptions through.
  2. Throws no exceptions, passes all exceptions through.
  3. 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.