Rudiments
|
Inherits object.
Public Member Functions | |
filesystem () | |
virtual | ~filesystem () |
bool | open (const char *path) |
bool | open (int32_t fd) |
bool | close () |
bool | getCurrentProperties () |
int64_t | getType () |
int64_t | getBlockSize () |
int64_t | getOptimumTransferBlockSize () |
int64_t | getTotalBlocks () |
int64_t | getFreeBlocks () |
int64_t | getAvailableBlocks () |
int64_t | getReservedBlocks () |
int64_t | getTotalFileNodes () |
int64_t | getFreeFileNodes () |
int64_t | getAvailableFileNodes () |
int64_t | getReservedFileNodes () |
int64_t | getFileSystemId () |
int64_t | getMaximumFileNameLength () |
uid_t | getOwner () |
int64_t | getSyncWrites () |
int64_t | getAsyncWrites () |
const char * | getTypeName () |
const char * | getMountPoint () |
int64_t | getSyncReads () |
int64_t | getAsyncReads () |
const char * | getDeviceName () |
const char * | getFilesystemSpecificString () |
void * | getInternalFilesystemStatisticsStructure () |
Public Member Functions inherited from object | |
virtual | ~object () |
The filesystem class provides methods for discovering the properties associated with a filesystem such as type, total and free blocks, total and free inodes, etc.
The native methods for accessing filesystem data vary greatly between platforms and many of these methods only work at all on certain platforms.
filesystem::filesystem | ( | ) |
Creates an instance of the filesystem class.
|
virtual |
Deletes this instance of the filesystem class.
bool filesystem::close | ( | ) |
Closes the currently open filesystem.
int64_t filesystem::getAsyncReads | ( | ) |
Returns the number of asynchronous reads that have occurred since the filesytem was mounted.
int64_t filesystem::getAsyncWrites | ( | ) |
Returns the number of asynchronous writes that have occurred since the filesytem was mounted.
int64_t filesystem::getAvailableBlocks | ( | ) |
Returns the number of blocks available to non-superuser accounts on the filesystem.
int64_t filesystem::getAvailableFileNodes | ( | ) |
Returns the number of file nodes available to non-superuser accounts.
int64_t filesystem::getBlockSize | ( | ) |
Returns the fundamental block size of the filesystem.
bool filesystem::getCurrentProperties | ( | ) |
Refreshes the current filesystem properties as returned by the various methods of this class. Returns true on success and false on failure.
const char* filesystem::getDeviceName | ( | ) |
Returns the name of the device file for the filesystem.
int64_t filesystem::getFileSystemId | ( | ) |
Returns the file system id.
const char* filesystem::getFilesystemSpecificString | ( | ) |
Returns the filesystem-specific string.
int64_t filesystem::getFreeBlocks | ( | ) |
Returns the number of free blocks in the filesystem.
int64_t filesystem::getFreeFileNodes | ( | ) |
Returns the number of free file nodes.
void* filesystem::getInternalFilesystemStatisticsStructure | ( | ) |
Returns a pointer to the filesystem stats structure used internally. (This is VERY system-specific and could be struct statfs *, struct statvfs * or something else.)
int64_t filesystem::getMaximumFileNameLength | ( | ) |
Returns the maximum character length of filenames on the filesystem.
const char* filesystem::getMountPoint | ( | ) |
Returns the mount point of the filesystem.
int64_t filesystem::getOptimumTransferBlockSize | ( | ) |
Returns the optimum transfer block size.
uid_t filesystem::getOwner | ( | ) |
Returns the id of the user that mounted the filesystem.
int64_t filesystem::getReservedBlocks | ( | ) |
Returns the number of blocks reserved for superuser accounts on the filesystem.
int64_t filesystem::getReservedFileNodes | ( | ) |
Returns the number of file nodes reserved for superuser accounts.
int64_t filesystem::getSyncReads | ( | ) |
Returns the number of synchronous reads that have occurred since the filesytem was mounted.
int64_t filesystem::getSyncWrites | ( | ) |
Returns the number of synchronous writes that have occurred since the filesytem was mounted.
int64_t filesystem::getTotalBlocks | ( | ) |
Returns the total number of blocks allocated for the filesystem.
int64_t filesystem::getTotalFileNodes | ( | ) |
Returns the number of file nodes on the filesystem.
int64_t filesystem::getType | ( | ) |
Returns a number representing the filesystem type.
const char* filesystem::getTypeName | ( | ) |
Returns the name of the filesystem type.
bool filesystem::open | ( | const char * | path | ) |
Opens the filesystem containing file or directory "path". If "path" is NULL or an empty string then it the instance is initialized using the current working directoy.
Returns true on success and false on failure.
bool filesystem::open | ( | int32_t | fd | ) |
Initializes the instance to use already open file descriptor "fd".
Returns true on success and false on failure.