| 867 | } |
| 868 | |
| 869 | bool PlatformFileSystem::isDirectory(PathId id) { |
| 870 | if (!id) return false; |
| 871 | |
| 872 | const std::filesystem::path dirpath = toPath(id); |
| 873 | |
| 874 | std::error_code ec; |
| 875 | return !dirpath.empty() && std::filesystem::exists(dirpath, ec) && !ec && |
| 876 | std::filesystem::is_directory(dirpath, ec) && !ec; |
| 877 | } |
| 878 | |
| 879 | bool PlatformFileSystem::isRegularFile(PathId id) { |
| 880 | if (!id) return false; |