Package oshi.software.os.mac
Class MacFileSystem
- java.lang.Object
-
- oshi.software.common.AbstractFileSystem
-
- oshi.software.os.mac.MacFileSystem
-
- All Implemented Interfaces:
FileSystem
@ThreadSafe public class MacFileSystem extends AbstractFileSystem
The Mac File System containsOSFileStore
s which are a storage pool, device, partition, volume, concrete file system or other implementation specific means of file storage. In macOS, these are found in the /Volumes directory.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.List<java.nio.file.PathMatcher>
FS_PATH_EXCLUDES
private static java.util.List<java.nio.file.PathMatcher>
FS_PATH_INCLUDES
private static java.util.List<java.nio.file.PathMatcher>
FS_VOLUME_EXCLUDES
private static java.util.List<java.nio.file.PathMatcher>
FS_VOLUME_INCLUDES
private static java.util.regex.Pattern
LOCAL_DISK
private static org.slf4j.Logger
LOG
private static int
MNT_ASYNC
private static int
MNT_AUTOMOUNTED
private static int
MNT_CPROTECT
private static int
MNT_DEFWRITE
private static int
MNT_DONTBROWSE
private static int
MNT_DOVOLFS
private static int
MNT_EXPORTED
private static int
MNT_IGNORE_OWNERSHIP
private static int
MNT_JOURNALED
private static int
MNT_LOCAL
private static int
MNT_MULTILABEL
private static int
MNT_NOATIME
private static int
MNT_NODEV
private static int
MNT_NOEXEC
private static int
MNT_NOSUID
private static int
MNT_NOUSERXATTR
private static int
MNT_QUARANTINE
private static int
MNT_QUOTA
private static int
MNT_RDONLY
private static int
MNT_ROOTFS
private static int
MNT_SYNCHRONOUS
private static int
MNT_UNION
private static java.util.Map<java.lang.Integer,java.lang.String>
OPTIONS_MAP
static java.lang.String
OSHI_MAC_FS_PATH_EXCLUDES
static java.lang.String
OSHI_MAC_FS_PATH_INCLUDES
static java.lang.String
OSHI_MAC_FS_VOLUME_EXCLUDES
static java.lang.String
OSHI_MAC_FS_VOLUME_INCLUDES
-
Fields inherited from class oshi.software.common.AbstractFileSystem
NETWORK_FS_TYPES, PSEUDO_FS_TYPES
-
-
Constructor Summary
Constructors Constructor Description MacFileSystem()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static java.util.List<OSFileStore>
getFileStoreMatching(java.lang.String nameToMatch)
private static java.util.List<OSFileStore>
getFileStoreMatching(java.lang.String nameToMatch, boolean localOnly)
java.util.List<OSFileStore>
getFileStores(boolean localOnly)
Get file stores on this machine Instantiates a list ofOSFileStore
objects, representing a storage pool, device, partition, volume, concrete file system or other implementation specific means of file storage.long
getMaxFileDescriptors()
The maximum number of open file descriptors.long
getMaxFileDescriptorsPerProcess()
The maximum number of open file descriptors per process.long
getOpenFileDescriptors()
The current number of open file descriptors.-
Methods inherited from class oshi.software.common.AbstractFileSystem
getFileStores
-
-
-
-
Field Detail
-
LOG
private static final org.slf4j.Logger LOG
-
OSHI_MAC_FS_PATH_EXCLUDES
public static final java.lang.String OSHI_MAC_FS_PATH_EXCLUDES
- See Also:
- Constant Field Values
-
OSHI_MAC_FS_PATH_INCLUDES
public static final java.lang.String OSHI_MAC_FS_PATH_INCLUDES
- See Also:
- Constant Field Values
-
OSHI_MAC_FS_VOLUME_EXCLUDES
public static final java.lang.String OSHI_MAC_FS_VOLUME_EXCLUDES
- See Also:
- Constant Field Values
-
OSHI_MAC_FS_VOLUME_INCLUDES
public static final java.lang.String OSHI_MAC_FS_VOLUME_INCLUDES
- See Also:
- Constant Field Values
-
FS_PATH_EXCLUDES
private static final java.util.List<java.nio.file.PathMatcher> FS_PATH_EXCLUDES
-
FS_PATH_INCLUDES
private static final java.util.List<java.nio.file.PathMatcher> FS_PATH_INCLUDES
-
FS_VOLUME_EXCLUDES
private static final java.util.List<java.nio.file.PathMatcher> FS_VOLUME_EXCLUDES
-
FS_VOLUME_INCLUDES
private static final java.util.List<java.nio.file.PathMatcher> FS_VOLUME_INCLUDES
-
LOCAL_DISK
private static final java.util.regex.Pattern LOCAL_DISK
-
MNT_RDONLY
private static final int MNT_RDONLY
- See Also:
- Constant Field Values
-
MNT_SYNCHRONOUS
private static final int MNT_SYNCHRONOUS
- See Also:
- Constant Field Values
-
MNT_NOEXEC
private static final int MNT_NOEXEC
- See Also:
- Constant Field Values
-
MNT_NOSUID
private static final int MNT_NOSUID
- See Also:
- Constant Field Values
-
MNT_NODEV
private static final int MNT_NODEV
- See Also:
- Constant Field Values
-
MNT_UNION
private static final int MNT_UNION
- See Also:
- Constant Field Values
-
MNT_ASYNC
private static final int MNT_ASYNC
- See Also:
- Constant Field Values
-
MNT_CPROTECT
private static final int MNT_CPROTECT
- See Also:
- Constant Field Values
-
MNT_EXPORTED
private static final int MNT_EXPORTED
- See Also:
- Constant Field Values
-
MNT_QUARANTINE
private static final int MNT_QUARANTINE
- See Also:
- Constant Field Values
-
MNT_LOCAL
private static final int MNT_LOCAL
- See Also:
- Constant Field Values
-
MNT_QUOTA
private static final int MNT_QUOTA
- See Also:
- Constant Field Values
-
MNT_ROOTFS
private static final int MNT_ROOTFS
- See Also:
- Constant Field Values
-
MNT_DOVOLFS
private static final int MNT_DOVOLFS
- See Also:
- Constant Field Values
-
MNT_DONTBROWSE
private static final int MNT_DONTBROWSE
- See Also:
- Constant Field Values
-
MNT_IGNORE_OWNERSHIP
private static final int MNT_IGNORE_OWNERSHIP
- See Also:
- Constant Field Values
-
MNT_AUTOMOUNTED
private static final int MNT_AUTOMOUNTED
- See Also:
- Constant Field Values
-
MNT_JOURNALED
private static final int MNT_JOURNALED
- See Also:
- Constant Field Values
-
MNT_NOUSERXATTR
private static final int MNT_NOUSERXATTR
- See Also:
- Constant Field Values
-
MNT_DEFWRITE
private static final int MNT_DEFWRITE
- See Also:
- Constant Field Values
-
MNT_MULTILABEL
private static final int MNT_MULTILABEL
- See Also:
- Constant Field Values
-
MNT_NOATIME
private static final int MNT_NOATIME
- See Also:
- Constant Field Values
-
OPTIONS_MAP
private static final java.util.Map<java.lang.Integer,java.lang.String> OPTIONS_MAP
-
-
Method Detail
-
getFileStores
public java.util.List<OSFileStore> getFileStores(boolean localOnly)
Description copied from interface:FileSystem
Get file stores on this machine Instantiates a list ofOSFileStore
objects, representing a storage pool, device, partition, volume, concrete file system or other implementation specific means of file storage.- Parameters:
localOnly
- If true, filters the list to only local file stores.- Returns:
- A list of
OSFileStore
objects or an empty array if none are present.
-
getFileStoreMatching
static java.util.List<OSFileStore> getFileStoreMatching(java.lang.String nameToMatch)
-
getFileStoreMatching
private static java.util.List<OSFileStore> getFileStoreMatching(java.lang.String nameToMatch, boolean localOnly)
-
getOpenFileDescriptors
public long getOpenFileDescriptors()
Description copied from interface:FileSystem
The current number of open file descriptors. A file descriptor is an abstract handle used to access I/O resources such as files and network connections. On UNIX-based systems there is a system-wide limit on the number of open file descriptors. On Windows systems, this method returns the total number of handles held by Processes. While Windows handles are conceptually similar to file descriptors, they may also refer to a number of non-I/O related objects.- Returns:
- The number of open file descriptors if available, 0 otherwise.
-
getMaxFileDescriptors
public long getMaxFileDescriptors()
Description copied from interface:FileSystem
The maximum number of open file descriptors. A file descriptor is an abstract handle used to access I/O resources such as files and network connections. On UNIX-based systems there is a system-wide limit on the number of open file descriptors. On Windows systems, this method returns the theoretical max number of handles (2^24-2^15 on 32-bit, 2^24-2^16 on 64-bit). There may be a lower per-process limit. While Windows handles are conceptually similar to file descriptors, they may also refer to a number of non-I/O related objects.- Returns:
- The maximum number of file descriptors if available, 0 otherwise.
-
getMaxFileDescriptorsPerProcess
public long getMaxFileDescriptorsPerProcess()
Description copied from interface:FileSystem
The maximum number of open file descriptors per process. This returns the upper limit which applies to each process. The actual limit of a process may be lower if configured.- Returns:
- The maximum number of file descriptors of each process if available, 0 otherwise.
-
-