Package com.github.mjdev.libaums.fs
Interface FileSystem
-
- All Known Implementing Classes:
Fat32FileSystem
public interface FileSystemThis class represents a file system.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetCapacity()intgetChunkSize()longgetFreeSpace()ATTENTION: This value can be inaccurate, depending on actual file system and certain file system specific properties.longgetOccupiedSpace()ATTENTION: This value can be inaccurate, depending on actual file system and certain file system specific properties.UsbFilegetRootDirectory()This method returns the root directory of the file system.intgetType()java.lang.StringgetVolumeLabel()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)
-
getType
int getType()
- Returns:
- file system type
PartitionTypes
-
-