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

Method FileExists

tensorflow/core/platform/env_test.cc:297–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295class TmpDirFileSystem : public NullFileSystem {
296 public:
297 Status FileExists(const string& dir) override {
298 StringPiece scheme, host, path;
299 io::ParseURI(dir, &scheme, &host, &path);
300 if (path.empty()) return errors::NotFound(dir, " not found");
301 // The special "flushed" file exists only if the filesystem's caches have
302 // been flushed.
303 if (path == "/flushed") {
304 if (flushed_) {
305 return Status::OK();
306 } else {
307 return errors::NotFound("FlushCaches() not called yet");
308 }
309 }
310 return Env::Default()->FileExists(io::JoinPath(BaseDir(), path));
311 }
312
313 Status CreateDir(const string& dir) override {
314 StringPiece scheme, host, path;

Callers 1

TEST_FFunction · 0.45

Calls 6

ParseURIFunction · 0.85
NotFoundFunction · 0.85
DefaultFunction · 0.85
BaseDirFunction · 0.85
JoinPathFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected