MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetFileSize

Method GetFileSize

src/leveldb/util/env_posix.cc:624–632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622 }
623
624 Status GetFileSize(const std::string& filename, uint64_t* size) override {
625 struct ::stat file_stat;
626 if (::stat(filename.c_str(), &file_stat) != 0) {
627 *size = 0;
628 return PosixError(filename, errno);
629 }
630 *size = file_stat.st_size;
631 return Status::OK();
632 }
633
634 Status RenameFile(const std::string& from, const std::string& to) override {
635 if (std::rename(from.c_str(), to.c_str()) != 0) {

Callers 7

GetFileSizeFunction · 0.45
FileSizeMethod · 0.45
CorruptMethod · 0.45
RecoverLogFileMethod · 0.45
ScanTableMethod · 0.45
DumpTableFunction · 0.45
ReuseManifestMethod · 0.45

Calls 3

statClass · 0.85
PosixErrorFunction · 0.85
OKFunction · 0.85

Tested by 2

FileSizeMethod · 0.36
CorruptMethod · 0.36