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

Method Stat

tensorflow/core/platform/posix/posix_file_system.cc:307–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307Status PosixFileSystem::Stat(const string& fname, FileStatistics* stats) {
308 Status s;
309 struct stat sbuf;
310 if (stat(TranslateName(fname).c_str(), &sbuf) != 0) {
311 s = IOError(fname, errno);
312 } else {
313 stats->length = sbuf.st_size;
314 stats->mtime_nsec = sbuf.st_mtime * 1e9;
315 stats->is_directory = S_ISDIR(sbuf.st_mode);
316 }
317 return s;
318}
319
320Status PosixFileSystem::RenameFile(const string& src, const string& target) {
321 Status result;

Callers

nothing calls this directly

Calls 3

IOErrorFunction · 0.85
c_strMethod · 0.80
statClass · 0.70

Tested by

no test coverage detected