IVolume

This class provides a surrogate object for a file system volume.

Do not derive your own classes from this class.


IVolume - Member Functions and Data by Group

Constructors & Destructor

Use the functions in this group to construct and destroy IVolume objects.


[view class]
~IVolume
public:
virtual ~IVolume()
Destructor.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IVolume
Constructs an IVolume object.


Overload 1
public:
IVolume()
Default constructor.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
IVolume(const IVolume& copy)
Copy constructor.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Class constants


[view class]
kKind
public:
static const IFileKind _IMPORT kKind

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Obtaining Volume Property Information

Use the functions in this group to obtain property information about a volume, such as the total amount of space, the amount of available space, whether it is local or remote, and whether it is removable.


[view class]
freeSpace
public:
IFileSize freeSpace() const
Returns the amount of available space on the volume, in bytes.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
getRecord
public:
IFSVolumeRecord* getRecord() const

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
online
public:
EState online() const
Tests whether the volume is online.

Return
kTrue if the volume's contents are currently accessible, kFalse if not, and kUnkown if it could not be determined.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
remote
public:
EState remote() const
Tests whether the volume is local or remote.

Return
kTrue if the volume is mounted remotely over a network, kFalse if it is local, and kUnkown if it could not be determined.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
removable
public:
EState removable() const
Tests whether the volume is a removable disk.

Return
kTrue if the volume is a removable disk such as a floppy or CD, kFalse if it is fixed, and kUnkown if it could not be determined.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
totalSpace
public:
IFileSize totalSpace() const
Returns the total size of the volume, in bytes.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Special "Downcast" Constructors

Use the constructors in this group to create IVolume objects based on the given information, such as a host path name, a partial path name, a file system entity, or a file system volume record.


[view class]
IVolume
Constructs an IVolume object.


Overload 1
Constructs an IVolume from an entity object, with type checking.
public:
IVolume(const IFileSystemEntity& copy)
Use this constructor to create a file system entity object, with type checking.

copy
If this entity refers to a physical volume, the constructed IVolume refers to the same object. If not, an exception is thrown.

Exception

IEntityTypeMismatch thrown if the specified entity is not a volume

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
IVolume(IFSVolumeRecord* Record)
Use this constructor to create an IVolume object from a file system record.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 3
Constucts an IVolume from a host-specific path name.
public:
IVolume( const IHostPathName& path, const ICompoundNameParser& = defaultParser ( ) )
Use this constructor to create an IVolume object from a host-specific path name.

path
A text string containing the host-specific path name.

parser
The path name parser which should be used to parse the provided path. If no parser is specified, the default for the current system is used.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
operator =
public:
IVolume& operator =(const IFileSystemEntity& right)
Assigns an IVolume to an entity object, with type checking.

copy
If this entity refers to a physical volume, the IVolume now refers to the same object. If not, an exception is thrown.

Exception

IEntityTypeMismatch thrown if the specified entity is not a volume

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IVolume - Enumerations


[view class]
EState
enum EState { kFalse=0, 
              kUnknown, 
              kTrue }
Return value for IVolume state access member functions.

kUnknown means that the state could not be determined, either because the host operating system does not support that type of state or because determining the state would be an unreasonably expensive operation.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IVolume - Inherited Member Functions and Data

Inherited Public Functions

IDirectory
IFileSystemEntity
IMStreamable

Inherited Public Data

Inherited Protected Functions

IMStreamable
IFileSystemEntity

Inherited Protected Data