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

Method GetFileInfo

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

Source from the content-addressed store, hash-verified

559}
560
561Result<FileInfo> MockFileSystem::GetFileInfo(const std::string& path) {
562 RETURN_NOT_OK(ValidatePath(path));
563 auto parts = SplitAbstractPath(path);
564 RETURN_NOT_OK(ValidateAbstractPathParts(parts));
565
566 auto guard = impl_->lock_guard();
567
568 FileInfo info;
569 Entry* entry = impl_->FindEntry(parts);
570 if (entry == nullptr) {
571 info.set_type(FileType::NotFound);
572 } else {
573 info = entry->GetInfo();
574 }
575 info.set_path(path);
576 return info;
577}
578
579Result<FileInfoVector> MockFileSystem::GetFileInfo(const FileSelector& selector) {
580 RETURN_NOT_OK(ValidatePath(selector.base_dir));

Callers

nothing calls this directly

Calls 10

SplitAbstractPathFunction · 0.85
lock_guardMethod · 0.80
FindEntryMethod · 0.80
is_dirMethod · 0.80
GatherInfosMethod · 0.80
ValidatePathFunction · 0.70
PathNotFoundFunction · 0.70
NotADirFunction · 0.70
GetInfoMethod · 0.45

Tested by

no test coverage detected