aboutsummaryrefslogtreecommitdiff
path: root/src/posix_extras.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/posix_extras.cc')
-rw-r--r--src/posix_extras.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/posix_extras.cc b/src/posix_extras.cc
index 11db247..c0a5234 100644
--- a/src/posix_extras.cc
+++ b/src/posix_extras.cc
@@ -154,6 +154,8 @@ void File::SymLinkAt(const char* const target, const char* const source) const {
CheckSyscall(symlinkat(target, fd_, source));
}
+void File::Truncate(const off_t size) { CheckSyscall(ftruncate(fd_, size)); }
+
void File::UnlinkAt(const char* const path) const {
ValidatePath(path);
CheckSyscall(unlinkat(fd_, path, 0));