Interface OSFileStore

All Known Implementing Classes:
AbstractOSFileStore, AixOSFileStore, FreeBsdOSFileStore, LinuxOSFileStore, MacOSFileStore, 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 Summary

    Modifier and Type Method Description
    java.lang.String getDescription()
    Description of the File System
    long getFreeInodes()
    Usable / free inodes on the drive.
    long getFreeSpace()
    Free space on the drive.
    java.lang.String getLabel()
    Label of the File System
    java.lang.String getLogicalVolume()
    Logical volume of the File System Provides an optional alternative volume identifier for the file system.
    java.lang.String getMount()
    Mountpoint of the File System
    java.lang.String getName()
    Name of the File System
    java.lang.String getOptions()
    Filesystem options
    long getTotalInodes()
    Total / maximum number of inodes of the filesystem.
    long getTotalSpace()
    Total space/capacity of the drive.
    java.lang.String getType()
    Type of the File System (FAT, NTFS, etx2, ext4, etc)
    long getUsableSpace()
    Usable space on the drive.
    java.lang.String getUUID()
    UUID/GUID of the File System
    java.lang.String getVolume()
    Volume name of the File System
    boolean updateAttributes()
    Make a best effort to update all the statistics about the file store without needing to recreate the file store list.
  • Method Details

    • getName

      java.lang.String getName()
      Name of the File System
      Returns:
      The file system name
    • getVolume

      java.lang.String getVolume()
      Volume name of the File System
      Returns:
      The volume name of the file system
    • getLabel

      java.lang.String getLabel()
      Label of the File System
      Returns:
      The volume label of the file system, on Windows. Other operating systems is redundant with the name.
    • getLogicalVolume

      java.lang.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

      java.lang.String getMount()
      Mountpoint of the File System
      Returns:
      The mountpoint of the file system
    • getDescription

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

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

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

      java.lang.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