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

Method GetFileSize

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

Source from the content-addressed store, hash-verified

293}
294
295Status PosixFileSystem::GetFileSize(const string& fname, uint64* size) {
296 Status s;
297 struct stat sbuf;
298 if (stat(TranslateName(fname).c_str(), &sbuf) != 0) {
299 *size = 0;
300 s = IOError(fname, errno);
301 } else {
302 *size = sbuf.st_size;
303 }
304 return s;
305}
306
307Status PosixFileSystem::Stat(const string& fname, FileStatistics* stats) {
308 Status s;

Callers

nothing calls this directly

Calls 3

IOErrorFunction · 0.85
c_strMethod · 0.80
statClass · 0.70

Tested by

no test coverage detected