17#include <system_error>
20#include <Availability.h>
22#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) \
23 || (defined(__cplusplus) && __cplusplus >= 201703L)) \
24 && defined(__has_include)
25#if __has_include(<filesystem>) \
26 && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) \
27 || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) \
28 && (defined(__clang__) || !defined(__GNUC__) || __GNUC__ >= 10 \
29 || (__GNUC__ >= 9 && __GNUC_MINOR__ >= 1))
33using namespace std::filesystem;
42#define GHC_FILESYSTEM_FWD
116 return OpenFlags(
unsigned(A) |
unsigned(B));
172 unsigned Mode = 0666) {
195 unsigned Mode = 0666) {
Definition: filesystem.hpp:1219
Definition: filesystem.hpp:1173
Definition: filesystem.hpp:1196
Definition: filesystem.hpp:374
file_t OpenFileForReadWrite(const path &Path, std::error_code &EC, CreationDisposition Disp, OpenFlags Flags, unsigned Mode=0666)
Opens the file with the given name in a write-only or read-write mode, returning its open file descri...
Definition: fs.h:193
OpenFlags
Definition: fs.h:90
@ F_Append
Definition: fs.h:101
@ OF_Append
The file should be opened in append mode.
Definition: fs.h:100
@ OF_ChildInherit
When a child process is launched, this file should remain open in the child process.
Definition: fs.h:108
@ OF_None
Definition: fs.h:91
@ OF_Text
The file should be opened in text mode on platforms that make this distinction.
Definition: fs.h:96
@ F_Text
Definition: fs.h:97
@ OF_Delete
Delete the file on close. Only makes a difference on windows.
Definition: fs.h:104
@ F_None
Definition: fs.h:92
@ OF_UpdateAtime
Force files Atime to be updated on access.
Definition: fs.h:112
FileAccess
Definition: fs.h:85
@ FA_Write
Definition: fs.h:87
@ FA_Read
Definition: fs.h:86
int FileToFd(file_t &F, std::error_code &EC, OpenFlags Flags)
Converts a file object to a file descriptor.
ghc::filesystem::ofstream ofstream
Definition: fs.h:47
file_t OpenFileForWrite(const path &Path, std::error_code &EC, CreationDisposition Disp, OpenFlags Flags, unsigned Mode=0666)
Opens the file with the given name in a write-only or read-write mode, returning its open file descri...
Definition: fs.h:170
CreationDisposition
Definition: fs.h:63
@ CD_OpenExisting
CD_OpenExisting - When opening a file:
Definition: fs.h:77
@ CD_CreateNew
CD_CreateNew - When opening a file:
Definition: fs.h:72
@ CD_OpenAlways
CD_OpenAlways - When opening a file:
Definition: fs.h:82
@ CD_CreateAlways
CD_CreateAlways - When opening a file:
Definition: fs.h:67
int file_t
Definition: fs.h:58
void CloseFile(file_t &F)
Closes the file object.
file_t OpenFileForRead(const path &Path, std::error_code &EC, OpenFlags Flags=OF_None)
Opens the file with the given name in a read-only mode, returning its open file descriptor.
OpenFlags operator|(OpenFlags A, OpenFlags B)
Definition: fs.h:115
const file_t kInvalidFile
ghc::filesystem::fstream fstream
Definition: fs.h:48
ghc::filesystem::ifstream ifstream
Definition: fs.h:46
file_t OpenFile(const path &Path, std::error_code &EC, CreationDisposition Disp, FileAccess Access, OpenFlags Flags, unsigned Mode=0666)
Opens a file with the specified creation disposition, access mode, and flags and returns a platform-s...
OpenFlags & operator|=(OpenFlags &A, OpenFlags B)
Definition: fs.h:119
Definition: filesystem.hpp:314
basic_ofstream< char > ofstream
Definition: filesystem.hpp:1244
basic_fstream< char > fstream
Definition: filesystem.hpp:1246
basic_ifstream< char > ifstream
Definition: filesystem.hpp:1242
static constexpr const unit_t< compound_unit< charge::coulomb, inverse< substance::mol > > > F(N_A *e)
Faraday constant.