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

Function Depth

cpp/src/arrow/filesystem/gcsfs_internal.cc:302–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302std::int64_t Depth(std::string_view path) {
303 // The last slash is not counted towards depth because it represents a
304 // directory.
305 bool has_trailing_slash = !path.empty() && path.back() == '/';
306 return std::count(path.begin(), path.end(), fs::internal::kSep) - has_trailing_slash;
307}
308
309// Change the default upload buffer size. In general, sending larger buffers is more
310// efficient with GCS, as each buffer requires a roundtrip to the service. With formatted

Callers 2

TEST_FFunction · 0.85
GetFileInfoMethod · 0.85

Calls 5

countFunction · 0.85
backMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 1

TEST_FFunction · 0.68