MCPcopy Create free account
hub / github.com/apache/arrow / NativeReal

Function NativeReal

cpp/src/arrow/util/io_util.cc:512–526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

510namespace {
511
512Result<NativePathString> NativeReal(const NativePathString& path) {
513#if _WIN32
514 std::array<wchar_t, _MAX_PATH> resolved = {};
515 if (_wfullpath(const_cast<wchar_t*>(path.c_str()), resolved.data(), resolved.size()) ==
516 nullptr) {
517 return IOErrorFromWinError(errno, "Failed to resolve real path");
518 }
519#else
520 std::array<char, PATH_MAX + 1> resolved;
521 if (realpath(path.c_str(), resolved.data()) == nullptr) {
522 return IOErrorFromErrno(errno, "Failed to resolve real path");
523 }
524#endif
525 return NativePathString{resolved.data()};
526}
527
528} // namespace
529

Callers

nothing calls this directly

Calls 4

IOErrorFromWinErrorFunction · 0.85
IOErrorFromErrnoFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected