Class AbstractOSFileStore
java.lang.Object
oshi.software.common.AbstractOSFileStore
- All Implemented Interfaces:
OSFileStore
- Direct Known Subclasses:
AixOSFileStore, FreeBsdOSFileStore, LinuxOSFileStore, MacOSFileStore, OpenBsdOSFileStore, SolarisOSFileStore, WindowsOSFileStore
Common implementations for OSFileStore
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()Label of the File System.getMount()Mount point of the File System.getName()Name of the File System.Filesystem options.getUUID()UUID/GUID of the File System.Volume name of the File System.booleanisLocal()Indicates whether this file store is local, providing low-latency access.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface OSFileStore
getDescription, getFreeInodes, getFreeSpace, getLogicalVolume, getTotalInodes, getTotalSpace, getType, getUsableSpace, updateAttributes
-
Constructor Details
-
AbstractOSFileStore
-
AbstractOSFileStore
protected AbstractOSFileStore()
-
-
Method Details
-
getName
Description copied from interface:OSFileStoreName of the File System. A human-readable label that does not necessarily correspond to a file system path.- Specified by:
getNamein interfaceOSFileStore- Returns:
- The file system name
-
getVolume
Description copied from interface:OSFileStoreVolume name of the File System. Generally a path representing the device (e.g.,/dev/foowhich is being mounted.- Specified by:
getVolumein interfaceOSFileStore- Returns:
- The volume name of the file system
-
getLabel
Description copied from interface:OSFileStoreLabel of the File System. An optional replacement for the name on Windows and Linux.- Specified by:
getLabelin interfaceOSFileStore- 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.
-
getMount
Description copied from interface:OSFileStoreMount point of the File System. The directory users will normally use to interface with the file store.- Specified by:
getMountin interfaceOSFileStore- Returns:
- The mountpoint of the file system
-
getOptions
Description copied from interface:OSFileStoreFilesystem options.- Specified by:
getOptionsin interfaceOSFileStore- Returns:
- A comma-deimited string of options
-
getUUID
Description copied from interface:OSFileStoreUUID/GUID of the File System.- Specified by:
getUUIDin interfaceOSFileStore- Returns:
- The file system UUID/GUID
-
isLocal
public boolean isLocal()Description copied from interface:OSFileStoreIndicates whether this file store is local, providing low-latency access.Local file stores are directly attached storage that return immediate results for file operations. This excludes network-mounted file systems (e.g., NFS, CIFS/SMB, AFP) which may have higher latency or require network round-trips.
On macOS, this corresponds to the
MNT_LOCALmount flag. On other platforms, this returnsfalsefor file systems with network types such asnfs,cifs,smbfs, andafs.- Specified by:
isLocalin interfaceOSFileStore- Returns:
trueif the file store is locally attached (not a network drive);falseotherwise
-
toString
-