ΒΆstd::error_code closeFile(
llvm::sys::fs::file_t& F)
std::error_code closeFile(
llvm::sys::fs::file_t& F)
Description
Close the file object. This should be used instead of ::close for portability. On error, the caller should assume the file is closed, as is the case for Process::SafelyCloseFileDescriptor
Declared at: llvm/include/llvm/Support/FileSystem.h:1143
Parameters
- llvm::sys::fs::file_t& F
- On input, this is the file to close. On output, the file is set to kInvalidFile.
Returns
An error code if closing the file failed. Typically, an error here means that the filesystem may have failed to perform some buffered writes.