MCPcopy Create free account
hub / github.com/Tencent/libpag / GetFileSize

Function GetFileSize

exporter/src/utils/FileHelper.cpp:63–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63size_t GetFileSize(const std::string& fileName) {
64 if (!FileIsExist(fileName)) {
65 return 0;
66 }
67 std::error_code ec;
68 auto ret = fs::file_size(Utf8ToPath(fileName), ec);
69 return ec ? 0 : ret;
70}
71
72bool FileIsExist(const std::string& fileName) {
73 if (fileName.empty()) {

Callers 1

ParseTextDocumentFunction · 0.85

Calls 2

FileIsExistFunction · 0.85
Utf8ToPathFunction · 0.50

Tested by

no test coverage detected