MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / GetFileSize

Method GetFileSize

Goldleaf/source/fs/fs_StdExplorer.cpp:242–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240 }
241
242 u64 StdExplorer::GetFileSize(const std::string &path) {
243 u64 file_size = 0;
244 const auto full_path = this->MakeFull(path);
245
246 struct stat st;
247 if(stat(full_path.c_str(), &st) == 0) {
248 file_size = st.st_size;
249 }
250 return file_size;
251 }
252
253 u64 StdExplorer::GetTotalSpace() {
254 // TODO?

Callers

nothing calls this directly

Calls 2

statClass · 0.85
MakeFullMethod · 0.80

Tested by

no test coverage detected