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

Method Make

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

Source from the content-addressed store, hash-verified

777}
778
779Result<std::shared_ptr<FileSystem>> MockFileSystem::Make(
780 TimePoint current_time, const std::vector<FileInfo>& infos) {
781 auto fs = std::make_shared<MockFileSystem>(current_time);
782 for (const auto& info : infos) {
783 switch (info.type()) {
784 case FileType::Directory:
785 RETURN_NOT_OK(fs->CreateDir(info.path(), /*recursive*/ true));
786 break;
787 case FileType::File:
788 RETURN_NOT_OK(fs->CreateFile(info.path(), "", /*recursive*/ true));
789 break;
790 default:
791 break;
792 }
793 }
794
795 return fs;
796}
797
798FileInfoGenerator MockAsyncFileSystem::GetFileInfoGenerator(const FileSelector& select) {
799 auto maybe_infos = GetFileInfo(select);

Callers

nothing calls this directly

Calls 4

typeMethod · 0.45
CreateDirMethod · 0.45
pathMethod · 0.45
CreateFileMethod · 0.45

Tested by

no test coverage detected