FileSystemImpl

class FileSystemImpl(val fileSystemInfo: FileSystem) : FileSystem

FileSystemImpl Implementation of the FileSystem interface, providing details about the file system and interacting with the underlying system's file stores and descriptors.

Author

N7ghtm4r3

Parameters

fileSystemInfo

The underlying file system information from the OS library (OSHI).

See also

Constructors

Link copied to clipboard
constructor(fileSystemInfo: FileSystem)

Properties

Link copied to clipboard
open override val fileStores: List<OSFileStore>

fileStores A list of file stores available in the system. Retrieves and transforms the file store details from the underlying file system.

Link copied to clipboard
private val fileSystemInfo: FileSystem
Link copied to clipboard
open override val maxFileDescriptors: Long

maxFileDescriptors The maximum number of file descriptors available for the entire system. Directly obtained from the underlying file system info.

Link copied to clipboard

maxFileDescriptorsPerProcess The maximum number of file descriptors available per process. Directly obtained from the underlying file system info.

Link copied to clipboard
open override val openFileDescriptors: Long

openFileDescriptors The current number of open file descriptors for the system. Directly obtained from the underlying file system info.

Functions

Link copied to clipboard
open override fun getFileStores(localOnly: Boolean): List<OSFileStore>

getFileStores Retrieves the file stores from the system, with an option to filter local file stores only.

Link copied to clipboard
private fun loadFileStoresList(sourceList: List<OSFileStore>): List<OSFileStore>

loadFileStoresList A helper function to convert raw file store data into a list of OSFileStore objects.