filesystem: use std for IsFolder

Remove custom platform implementation of IsFolder and replace
single use with `std::filesystem::is_directory`.
This commit is contained in:
Sandy Carter
2020-04-09 09:52:57 -04:00
committed by Rick Gibbed
parent 05a62673f7
commit a9fa38c88b
4 changed files with 1 additions and 18 deletions

View File

@@ -84,12 +84,6 @@ bool DeleteFolder(const std::filesystem::path& path) {
return SHFileOperation(&op) == 0;
}
bool IsFolder(const std::filesystem::path& path) {
DWORD attrib = GetFileAttributes(path.c_str());
return attrib != INVALID_FILE_ATTRIBUTES &&
(attrib & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY;
}
bool CreateFile(const std::filesystem::path& path) {
auto handle = CreateFileW(path.c_str(), 0, 0, nullptr, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, nullptr);