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

Method GetFileSize

tensorflow/core/util/memmapped_file_system.cc:130–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130Status MemmappedFileSystem::GetFileSize(const string& filename, uint64* size) {
131 if (!mapped_memory_) {
132 return errors::FailedPrecondition("MemmappedEnv is not initialized");
133 }
134 const auto dir_element = directory_.find(filename);
135 if (dir_element == directory_.end()) {
136 return errors::NotFound("Region ", filename, " is not found");
137 }
138 *size = dir_element->second.length;
139 return Status::OK();
140}
141
142Status MemmappedFileSystem::Stat(const string& fname, FileStatistics* stat) {
143 uint64 size;

Callers 6

MutateSavedTensorSlicesFunction · 0.45
TESTFunction · 0.45
FlipEndiannessBitFunction · 0.45
MergeOneBundleFunction · 0.45
BundleReaderMethod · 0.45

Calls 4

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

Tested by 3

MutateSavedTensorSlicesFunction · 0.36
TESTFunction · 0.36
FlipEndiannessBitFunction · 0.36