4 #ifndef RUDIMENTS_FILESYSTEM_H
5 #define RUDIMENTS_FILESYSTEM_H
7 #include <rudiments/private/filesystemincludes.h>
17 #ifdef RUDIMENTS_NAMESPACE
21 class filesystemprivate;
56 bool initialize(
const char *path);
62 bool initialize(int32_t fd);
66 int64_t getType()
const;
73 static bool getType(
const char *path, int64_t *type);
81 static bool getType(int32_t fd, int64_t *type);
85 int64_t getBlockSize()
const;
92 static bool getBlockSize(
const char *path, int64_t *size);
99 static bool getBlockSize(int32_t fd, int64_t *size);
103 int64_t getOptimumTransferBlockSize()
const;
110 static bool getOptimumTransferBlockSize(
const char *path,
119 static bool getOptimumTransferBlockSize(int32_t fd,
125 int64_t getTotalBlocks()
const;
132 static bool getTotalBlocks(
const char *path,
141 static bool getTotalBlocks(int32_t fd, int64_t *blocks);
145 int64_t getFreeBlocks()
const;
152 static bool getFreeBlocks(
const char *path,
161 static bool getFreeBlocks(int32_t fd, int64_t *blocks);
166 int64_t getAvailableBlocks()
const;
173 static bool getAvailableBlocks(
const char *path,
182 static bool getAvailableBlocks(int32_t fd, int64_t *blocks);
186 int64_t getTotalFileNodes()
const;
193 static bool getTotalFileNodes(
const char *path,
201 static bool getTotalFileNodes(int32_t fd, int64_t *nodes);
205 int64_t getFreeFileNodes()
const;
212 static bool getFreeFileNodes(
const char *path,
221 static bool getFreeFileNodes(int32_t fd, int64_t *nodes);
226 int64_t getAvailableFileNodes()
const;
231 static bool getAvailableFileNodes(
const char *path,
233 static bool getAvailableFileNodes(int32_t fd,
238 int64_t getFileSystemId()
const;
245 static bool getFileSystemId(
const char *path, int64_t *
id);
252 static bool getFileSystemId(int32_t fd, int64_t *
id);
256 int64_t getMaximumFileNameLength()
const;
263 static bool getMaximumFileNameLength(
const char *path,
272 static bool getMaximumFileNameLength(int32_t fd,
277 uid_t getOwner()
const;
284 static bool getOwner(
const char *path, uid_t *owner);
292 static bool getOwner(int32_t fd, uid_t *owner);
297 int64_t getSyncWrites()
const;
305 static bool getSyncWrites(
const char *path,
314 static bool getSyncWrites(int32_t fd, int64_t *swrites);
319 int64_t getAsyncWrites()
const;
327 static bool getAsyncWrites(
const char *path,
336 static bool getAsyncWrites(int32_t fd, int64_t *aswrites);
340 const char *getTypeName()
const;
347 static bool getTypeName(
const char *path,
356 static bool getTypeName(int32_t fd,
const char **name);
360 const char *getMountPoint()
const;
367 static bool getMountPoint(
const char *path,
375 static bool getMountPoint(int32_t fd,
const char **mtpt);
380 int64_t getSyncReads()
const;
388 static bool getSyncReads(
const char *path, int64_t *sreads);
396 static bool getSyncReads(int32_t fd, int64_t *sreads);
401 int64_t getAsyncReads()
const;
409 static bool getAsyncReads(
const char *path,
418 static bool getAsyncReads(int32_t fd, int64_t *asreads);
422 const char *getDeviceName()
const;
429 static bool getDeviceName(
const char *path,
430 const char **devname);
438 static bool getDeviceName(int32_t fd,
const char **devname);
442 const char *getFilesystemSpecificString()
const;
449 static bool getFilesystemSpecificString(
const char *path,
458 static bool getFilesystemSpecificString(int32_t fd,
465 bool getCurrentProperties();
470 void *getInternalFilesystemStatisticsStructure();
472 #include <rudiments/private/filesystem.h>
475 #ifdef RUDIMENTS_NAMESPACE