MCPcopy Create free account
hub / github.com/facebook/CacheLib / getFileSize

Function getFileSize

cachelib/allocator/nvmcache/tests/NavySetupTest.cpp:46–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46size_t getFileSize(std::string& fileName) {
47 auto f = folly::File(fileName.c_str());
48 struct stat fileStat;
49 auto ret = fstat(f.fd(), &fileStat);
50 XDCHECK(ret == 0);
51 return fileStat.st_size;
52}
53
54} // namespace
55TEST(NavySetupTest, RAID0DeviceSize) {

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected