24 StringRef Path, StringRef TmpPath)
42 switch (Stat.
type()) {
79 FD,
true, mapped_file_region::readwrite, Size, 0, EC));
95 if ( NewSmallerSize != -1 ) {
error_code resize_file(const Twine &path, uint64_t size)
Resize path to size. File is resized as if by POSIX truncate().
error_code status(const Twine &path, file_status &result)
Get file status as if by POSIX stat().
A single entry single exit Region.
error_code createUniqueFile(const Twine &Model, int &ResultFD, SmallVectorImpl< char > &ResultPath, unsigned Mode=all_read|all_write)
Create a uniquely named file.
static error_code create(StringRef FilePath, size_t Size, OwningPtr< FileOutputBuffer > &Result, unsigned Flags=0)
error_code commit(int64_t NewSmallerSize=-1)
error_code remove(const Twine &path, bool &existed)
Remove path. Equivalent to POSIX remove().
static error_code success()
error_code rename(const Twine &from, const Twine &to)
Rename from to to. Files are renamed as if by POSIX rename().
error_code make_error_code(errc _e)