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

Method IsDirectory

tensorflow/core/platform/file_system.cc:39–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39Status FileSystem::IsDirectory(const string& name) {
40 // Check if path exists.
41 TF_RETURN_IF_ERROR(FileExists(name));
42 FileStatistics stat;
43 TF_RETURN_IF_ERROR(Stat(name, &stat));
44 if (stat.is_directory) {
45 return Status::OK();
46 }
47 return Status(tensorflow::error::FAILED_PRECONDITION, "Not a directory");
48}
49
50void FileSystem::FlushCaches() {}
51

Callers

nothing calls this directly

Calls 3

StatClass · 0.85
StatusClass · 0.70
FileExistsFunction · 0.50

Tested by

no test coverage detected