| 61 | } |
| 62 | |
| 63 | size_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 | |
| 72 | bool FileIsExist(const std::string& fileName) { |
| 73 | if (fileName.empty()) { |
no test coverage detected