Class OSFileStore

  • All Implemented Interfaces:
    java.io.Serializable

    public class OSFileStore
    extends java.lang.Object
    implements java.io.Serializable
    A File Store is a storage pool, device, partition, volume, concrete file system or other implementation specific means of file storage. See subclasses for definitions as they apply to specific platforms.
    Author:
    widdis[at]gmail[dot]com
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Description of the File System
      long getFreeInodes()
      Usable / free inodes on the drive.
      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
      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 of the File System
      void setDescription​(java.lang.String value)
      Sets the File System description
      void setFreeInodes​(long value)
      Sets usable inodes on the drive.
      void setLogicalVolume​(java.lang.String value)
      Sets the logical volume of the File System
      void setMount​(java.lang.String value)
      Sets the mountpoint of the File System
      void setName​(java.lang.String value)
      Sets the File System name
      void setTotalInodes​(long value)
      Sets the total / maximum number of inodes on the filesystem.
      void setTotalSpace​(long value)
      Sets the total space on the drive.
      void setType​(java.lang.String value)
      Sets the File System type
      void setUsableSpace​(long value)
      Sets usable space on the drive.
      void setUUID​(java.lang.String value)
      Sets the File System UUID/GUID
      void setVolume​(java.lang.String value)
      Sets the volume of the File System
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OSFileStore

        public OSFileStore()
      • OSFileStore

        public OSFileStore​(OSFileStore fileStore)
        Creates a copy of an OSFileStore.
        Parameters:
        fileStore - OSFileStore which is copied
    • Method Detail

      • getName

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

        public void setName​(java.lang.String value)
        Sets the File System name
        Parameters:
        value - The name
      • getVolume

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

        public 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
      • setVolume

        public void setVolume​(java.lang.String value)
        Sets the volume of the File System
        Parameters:
        value - The volume
      • setLogicalVolume

        public void setLogicalVolume​(java.lang.String value)
        Sets the logical volume of the File System
        Parameters:
        value - The logical volume
      • getMount

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

        public void setMount​(java.lang.String value)
        Sets the mountpoint of the File System
        Parameters:
        value - The mountpoint
      • getDescription

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

        public void setDescription​(java.lang.String value)
        Sets the File System description
        Parameters:
        value - The description
      • getType

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

        public void setType​(java.lang.String value)
        Sets the File System type
        Parameters:
        value - The type
      • getUUID

        public java.lang.String getUUID()
        UUID/GUID of the File System
        Returns:
        The file system UUID/GUID
      • setUUID

        public void setUUID​(java.lang.String value)
        Sets the File System UUID/GUID
        Parameters:
        value - The UUID/GUID
      • getUsableSpace

        public long getUsableSpace()
        Usable space on the drive.
        Returns:
        Usable space on the drive (in bytes)
      • setUsableSpace

        public void setUsableSpace​(long value)
        Sets usable space on the drive.
        Parameters:
        value - Bytes of writable space.
      • getTotalSpace

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

        public void setTotalSpace​(long value)
        Sets the total space on the drive.
        Parameters:
        value - Bytes of total space.
      • getFreeInodes

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

        public void setFreeInodes​(long value)
        Sets usable inodes on the drive.
        Parameters:
        value - Number of free inodes.
      • getTotalInodes

        public 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
      • setTotalInodes

        public void setTotalInodes​(long value)
        Sets the total / maximum number of inodes on the filesystem.
        Parameters:
        value - Total / maximum count of inodes