Interface OSFileStore

All Known Implementing Classes:
AbstractOSFileStore, AixOSFileStore, FreeBsdOSFileStore, LinuxOSFileStore, MacOSFileStore, OpenBsdOSFileStore, SolarisOSFileStore, WindowsOSFileStore

@ThreadSafe public interface OSFileStore
A FileStore represents a storage pool, device, partition, volume, concrete file system or other implementation specific means of file storage. This object carries the same interpretation as core Java's FileStore class, with additional information.
  • Method Details

    • getName

      String getName()
      Name of the File System. A human-readable label that does not necessarily correspond to a file system path.
      Returns:
      The file system name
    • getVolume

      String getVolume()
      Volume name of the File System. Generally a path representing the device (e.g., /dev/foo which is being mounted.
      Returns:
      The volume name of the file system
    • getLabel

      String getLabel()
      Label of the File System. An optional replacement for the name on Windows and Linux.
      Returns:
      The volume label of the file system. Only relevant on Windows and on Linux, if assigned; otherwise defaults to the FileSystem name. On other operating systems is redundant with the name.
    • getLogicalVolume

      String getLogicalVolume()
      Logical volume of the File System. Provides an optional alternative volume identifier for the file system. Only supported on Linux, provides symlink value via '/dev/mapper/' (used with LVM file systems).
      Returns:
      The logical volume of the file system
    • getMount

      String getMount()
      Mount point of the File System. The directory users will normally use to interface with the file store.
      Returns:
      The mountpoint of the file system
    • getDescription

      String getDescription()
      Description of the File System.
      Returns:
      The file system description
    • getType

      String getType()
      Type of the File System (FAT, NTFS, etx2, ext4, etc.)
      Returns:
      The file system type
    • getOptions

      String getOptions()
      Filesystem options.
      Returns:
      A comma-deimited string of options
    • getUUID

      String getUUID()
      UUID/GUID of the File System.
      Returns:
      The file system UUID/GUID
    • getFreeSpace

      long getFreeSpace()
      Free space on the drive. This space is unallocated but may require elevated permissions to write.
      Returns:
      Free space on the drive (in bytes)
    • getUsableSpace

      long getUsableSpace()
      Usable space on the drive. This is space available to unprivileged users.
      Returns:
      Usable space on the drive (in bytes)
    • getTotalSpace

      long getTotalSpace()
      Total space/capacity of the drive.
      Returns:
      Total capacity of the drive (in bytes)
    • getFreeInodes

      long getFreeInodes()
      Usable / free inodes on the drive. Not applicable on Windows.
      Returns:
      Usable / free inodes on the drive (count), or -1 if unimplemented
    • getTotalInodes

      long getTotalInodes()
      Total / maximum number of inodes of the filesystem. Not applicable on Windows.
      Returns:
      Total / maximum number of inodes of the filesystem (count), or -1 if unimplemented
    • updateAttributes

      boolean updateAttributes()
      Make a best effort to update all the statistics about the file store without needing to recreate the file store list. This method provides for more frequent periodic updates of file store statistics.
      Returns:
      True if the update was (probably) successful, false if the disk was not found