aboutsummaryrefslogtreecommitdiff
path: root/src/posix_extras.h
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2016-02-21 23:05:22 -0500
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2016-02-21 23:05:22 -0500
commitbdab511d954a849d06e34f6d801cc374f867213b (patch)
tree92df0982596d1957232ccde6722504f3f24c84c5 /src/posix_extras.h
parent13643137642c5000924e20de56856c909b05769e (diff)
Implement statfs
Diffstat (limited to 'src/posix_extras.h')
-rw-r--r--src/posix_extras.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/posix_extras.h b/src/posix_extras.h
index b67e2b4..9dec22d 100644
--- a/src/posix_extras.h
+++ b/src/posix_extras.h
@@ -22,6 +22,7 @@
#include <dirent.h>
#include <sys/stat.h>
+#include <sys/statvfs.h>
#include <sys/types.h>
#include <time.h>
@@ -107,6 +108,10 @@ class File {
// path must indeed be relative (i.e., it must not start with '/').
void RmDirAt(const char* path) const;
+ // Retrieves information about the file system containing the referent of the
+ // file descriptor.
+ struct statvfs StatVFs() const;
+
// Creates a symlink at source pointing to target. target is unvalidated.
// source is interpreted as a path relative to the file descriptor and must
// indeed be relative (i.e., it must not start with '/').