Interface FileSystem

  • All Known Implementing Classes:
    Fat32FileSystem

    public interface FileSystem
    This class represents a file system.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long getCapacity()  
      int getChunkSize()  
      long getFreeSpace()
      ATTENTION: This value can be inaccurate, depending on actual file system and certain file system specific properties.
      long getOccupiedSpace()
      ATTENTION: This value can be inaccurate, depending on actual file system and certain file system specific properties.
      UsbFile getRootDirectory()
      This method returns the root directory of the file system.
      int getType()  
      java.lang.String getVolumeLabel()
      This method returns the name of the volume which is mostly saved in the file system.
    • Method Detail

      • getRootDirectory

        UsbFile getRootDirectory()
        This method returns the root directory of the file system.
        Returns:
        The root directory of the file system.
      • getVolumeLabel

        java.lang.String getVolumeLabel()
        This method returns the name of the volume which is mostly saved in the file system.

        In Windows the name of a volume is shown in the explorer before the drive letter.

        Returns:
      • getCapacity

        long getCapacity()
        Returns:
        The total "capacity" of the file system in bytes.
      • getOccupiedSpace

        long getOccupiedSpace()
        ATTENTION: This value can be inaccurate, depending on actual file system and certain file system specific properties. Use as an estimation.
        Returns:
        Occupied space in the file system in bytes (estimate).
      • getFreeSpace

        long getFreeSpace()
        ATTENTION: This value can be inaccurate, depending on actual file system and certain file system specific properties. Use as an estimation.
        Returns:
        Free space in the file system in bytes (estimate).
      • getChunkSize

        int getChunkSize()
        Returns:
        returns the optimal chuck size in bytes (you should read and write in multiples of that)