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

Method FileExists

tensorflow/core/util/memmapped_file_system.cc:89–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87MemmappedFileSystem::MemmappedFileSystem() {}
88
89Status MemmappedFileSystem::FileExists(const string& fname) {
90 if (!mapped_memory_) {
91 return errors::FailedPrecondition("MemmappedEnv is not initialized");
92 }
93 const auto dir_element = directory_.find(fname);
94 if (dir_element != directory_.end()) {
95 return Status::OK();
96 }
97 return errors::NotFound(fname, " not found");
98}
99
100Status MemmappedFileSystem::NewRandomAccessFile(
101 const string& filename, std::unique_ptr<RandomAccessFile>* result) {

Callers 7

FileStillExistsMethod · 0.45
VerifyFileFunction · 0.45
TESTFunction · 0.45
InitializeMethod · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 4

FailedPreconditionFunction · 0.85
NotFoundFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by 4

VerifyFileFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36