fs/FileSystem: add TruncateFile()

This commit is contained in:
Max Kellermann
2016-08-15 22:13:38 +02:00
parent 22a353b8e3
commit 2bca3cd247
2 changed files with 29 additions and 0 deletions

View File

@@ -104,6 +104,13 @@ StatFile(Path file, struct stat &buf, bool follow_symlinks = true)
#endif
/**
* Truncate a file that exists already. Throws std::system_error on
* error.
*/
void
TruncateFile(Path path);
/**
* Wrapper for unlink() that uses #Path names.
*/