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

Method GetInfo

cpp/src/arrow/filesystem/mockfs.cc:138–152  ·  view source on GitHub ↗

Get info for this entry. Note the path() property isn't set.

Source from the content-addressed store, hash-verified

136
137 // Get info for this entry. Note the path() property isn't set.
138 FileInfo GetInfo() {
139 FileInfo info;
140 if (is_dir()) {
141 Directory& dir = as_dir();
142 info.set_type(FileType::Directory);
143 info.set_mtime(dir.mtime);
144 } else {
145 DCHECK(is_file());
146 File& file = as_file();
147 info.set_type(FileType::File);
148 info.set_mtime(file.mtime);
149 info.set_size(file.size());
150 }
151 return info;
152 }
153
154 // Get info for this entry, knowing the parent path.
155 FileInfo GetInfo(const std::string& base_path) {

Callers 2

GatherInfosMethod · 0.45
GetFileInfoMethod · 0.45

Calls 2

ConcatAbstractPathFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected