MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / file

Method file

extlibs/fmt/src/os.cc:179–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177
178#if FMT_USE_FCNTL
179file::file(cstring_view path, int oflag) {
180 int mode = S_IRUSR | S_IWUSR;
181# if defined(_WIN32) && !defined(__MINGW32__)
182 fd_ = -1;
183 FMT_POSIX_CALL(sopen_s(&fd_, path.c_str(), oflag, _SH_DENYNO, mode));
184# else
185 FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, mode)));
186# endif
187 if (fd_ == -1)
188 FMT_THROW(system_error(errno, "cannot open file {}", path.c_str()));
189}
190
191file::~file() FMT_NOEXCEPT {
192 // Don't retry close in case of EINTR!

Callers

nothing calls this directly

Calls 2

system_errorFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected