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

Class ByPath

cpp/src/arrow/filesystem/filesystem.h:106–114  ·  view source on GitHub ↗

Function object implementing less-than comparison and hashing by path, to support sorting infos, using them as keys, and other interactions with the STL.

Source from the content-addressed store, hash-verified

104 /// path, to support sorting infos, using them as keys, and other
105 /// interactions with the STL.
106 struct ByPath {
107 bool operator()(const FileInfo& l, const FileInfo& r) const {
108 return l.path() < r.path();
109 }
110
111 size_t operator()(const FileInfo& i) const {
112 return std::hash<std::string>{}(i.path());
113 }
114 };
115
116 protected:
117 std::string path_;

Callers 1

MakeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected