MCPcopy Create free account
hub / github.com/apple/foundationdb / systemErrorCodeToError

Function systemErrorCodeToError

flow/Platform.actor.cpp:571–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569}
570
571Error systemErrorCodeToError() {
572#if defined(_WIN32)
573 if (GetLastError() == ERROR_IO_DEVICE) {
574 return io_error();
575 }
576#elif defined(__unixish__)
577 if (errno == EIO || errno == EROFS) {
578 return io_error();
579 }
580#else
581#error Port me!
582#endif
583
584 return platform_error();
585}
586
587void getDiskBytes(std::string const& directory, int64_t& free, int64_t& total) {
588 INJECT_FAULT(platform_error, "getDiskBytes"); // Get disk bytes failed

Callers 6

getDiskBytesFunction · 0.85
getDiskStatisticsFunction · 0.85
deleteFileFunction · 0.85
createDirectoryFunction · 0.85
abspathFunction · 0.85
eraseDirectoryRecursiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected