### 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.

~IVolume

      public:
      virtual ~IVolume()

  Destructor.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

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

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.

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

getRecord

      public:
      IFSVolumeRecord* getRecord() const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

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

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

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

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.

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

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

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

  -     virtual ~IDirectory()

  -     IDirectory
          createDirectory( const IFileName& pathOrName,
                           const ICompoundNameParser& = defaultParser ( ) )

  -     IFile
          createFile( const IFileName& name,
                      IFileSize initialSize = 0,
                      const ICompoundNameParser& = defaultParser ( ) )

  -     static IDirectory
          createTemporary( const IFileName& dirName = uniqueName ( ) )

  -     static IDirectory current()

  -     void deleteAllContents()

  -     IFSDirectoryRecord* getRecord() const

  -     IDirectory( const IPathName& path,
                    ECreateFlags flags = kMustExist )

  -     IDirectory(IFSDirectoryRecord* Record)

  -     IDirectory(const IDirectory& copy)

  -     IDirectory( const IHostPathName& path,
                    ECreateFlags flags = kMustExist,
                    const ICompoundNameParser& = defaultParser ( ) )

  -     IDirectory(const IFileSystemEntity& copy)

  -     IDirectory()

  -     IFileSystemEntity
          lookUp( const IHostPathName& pathOrName,
                  const ICompoundNameParser& = defaultParser ( ) ) const

  -     IFileSystemEntity
          lookUp( const IPathName& partialPath ) const

  -     IDirectory& operator =(const IFileSystemEntity& right)

  -     static void setCurrent(const IDirectory&)

  IFileSystemEntity

  -     virtual ~IFileSystemEntity()

  -     bool connected() const

  -     IFileSystemEntity
          copyTo( IDirectory& destination,
                  const IFileName& newName = "",
                  EFailureAction action = kStop ) const

  -     static const ICompoundNameParser& defaultParser()

  -     void deleteSelf(bool deleteChildren = false)

  -     IFSRecord* getRecord() const

  -     IHostPathName
          hostPath( const ICompoundNameParser& parser = defaultParser ( ) ) const

  -     IFileSystemEntity(const IFileSystemEntity& copy)

  -     IFileSystemEntity(const IPathName& path)

  -     IFileSystemEntity( const IHostPathName& hostPath,
                           const ICompoundNameParser& = defaultParser ( ) )

  -     IFileSystemEntity()

  -     IFileSystemEntity(IFSRecord* Record)

  -     bool isA(const IFileKind& kind) const

  -     ITimeStamp modificationTime() const

  -     void
          moveTo( IDirectory& destination,
                  const IFileName& newName = "",
                  EFailureAction action = kStop )

  -     IFileName name() const

  -     bool operator !=(const IFileSystemEntity& object) const

  -     virtual IFileSystemEntity&
          operator =( const IFileSystemEntity& right )

  -     bool operator ==(const IFileSystemEntity& object) const

  -     IDirectory parent() const

  -     IPathName path() const

  -     virtual void readFromStream(IDataStream& fromwhere)

  -     void setName(const IFileName& newName) const

  -     bool temporary() const

  -     IDirectory topmostParent() const

  -     static const IFileName& uniqueName()

  -     bool valid() const

  -     IVolume volume() const

  -     virtual void writeToStream(IDataStream& towhere) const

  IMStreamable

  -     virtual ~IMStreamable()

  -     void externalizeToStream(IDataStream& towhere) const

  -     void internalizeFromStream(IDataStream& fromwhere)

  -     virtual const ITypeRepresentation&
          typeRepresentation() const = 0

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  IMStreamable

  -     IMStreamable()

  -     IMStreamable(const IMStreamable& other)

  -     virtual void readFromStream(IDataStream& fromwhere) = 0

  -     virtual void writeToStream(IDataStream& towhere) const = 0

  IFileSystemEntity

  -     void setInvalid()

  -     void
          typeSafeAssign( const IFileSystemEntity& right,
                          const IFileKind& kind )

#### Inherited Protected Data

  - None