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

Method MakeUri

cpp/src/arrow/filesystem/localfs.cc:295–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295Result<std::string> LocalFileSystem::MakeUri(std::string path) const {
296 ARROW_ASSIGN_OR_RAISE(path, DoNormalizePath(std::move(path)));
297 if (!internal::DetectAbsolutePath(path)) {
298 return Status::Invalid("MakeUri requires an absolute path, got ", path);
299 }
300 ARROW_ASSIGN_OR_RAISE(auto uri, util::UriFromAbsolutePath(path));
301 if (uri[0] == '/') {
302 uri = "file://" + uri;
303 }
304 return uri + (options_.use_mmap ? "?use_mmap" : "");
305}
306
307bool LocalFileSystem::Equals(const FileSystem& other) const {
308 if (other.type_name() != type_name()) {

Callers

nothing calls this directly

Calls 4

DoNormalizePathFunction · 0.85
DetectAbsolutePathFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.50
InvalidFunction · 0.50

Tested by

no test coverage detected