MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GetFileSystemForFile

Method GetFileSystemForFile

tensorflow/core/platform/env.cc:95–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93Env::Env() : file_system_registry_(new FileSystemRegistryImpl) {}
94
95Status Env::GetFileSystemForFile(const string& fname, FileSystem** result) {
96 StringPiece scheme, host, path;
97 io::ParseURI(fname, &scheme, &host, &path);
98 FileSystem* file_system = file_system_registry_->Lookup(string(scheme));
99 if (!file_system) {
100 if (scheme.empty()) {
101 scheme = "[local]";
102 }
103
104 return errors::Unimplemented("File system scheme '", scheme,
105 "' not implemented (file: '", fname, "')");
106 }
107 *result = file_system;
108 return Status::OK();
109}
110
111Status Env::GetRegisteredFileSystemSchemes(std::vector<string>* schemes) {
112 return file_system_registry_->GetRegisteredFileSystemSchemes(schemes);

Callers 3

InitMethod · 0.45
RetrieveGcsFsFunction · 0.45
GetNextInternalMethod · 0.45

Calls 4

ParseURIFunction · 0.85
UnimplementedFunction · 0.85
LookupMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected