| 19 | namespace Valdi { |
| 20 | |
| 21 | static FileStat fileStatFromCStat(bool exists, const struct stat& stat) { |
| 22 | auto isDir = S_ISDIR(stat.st_mode); |
| 23 | auto isFile = S_ISREG(stat.st_mode); |
| 24 | return FileStat(exists, isDir, isFile, static_cast<size_t>(stat.st_size)); |
| 25 | } |
| 26 | |
| 27 | static FileStat statFromPath(const char* path) { |
| 28 | struct stat statStruct; |
no test coverage detected