Pass a FD to resise_file and add a testcase.

I will add a real use in another commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224136 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-12-12 17:55:12 +00:00
parent 7291e0706e
commit e1136e38a7
4 changed files with 18 additions and 19 deletions
+2 -2
View File
@@ -336,11 +336,11 @@ std::error_code copy_file(const Twine &From, const Twine &To);
/// @brief Resize path to size. File is resized as if by POSIX truncate().
///
/// @param path Input path.
/// @param path Input file descriptor.
/// @param size Size to resize to.
/// @returns errc::success if \a path has been resized to \a size, otherwise a
/// platform-specific error_code.
std::error_code resize_file(const Twine &path, uint64_t size);
std::error_code resize_file(int FD, uint64_t Size);
/// @}
/// @name Physical Observers