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:
committed by
Rick Gibbed
parent
05a62673f7
commit
a9fa38c88b
@@ -137,14 +137,6 @@ static uint64_t convertUnixtimeToWinFiletime(time_t unixtime) {
|
||||
return filetime;
|
||||
}
|
||||
|
||||
bool IsFolder(const std::filesystem::path& path) {
|
||||
struct stat st;
|
||||
if (stat(path.c_str(), &st) == 0) {
|
||||
if (S_ISDIR(st.st_mode)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CreateFile(const std::filesystem::path& path) {
|
||||
int file = creat(path.c_str(), 0774);
|
||||
if (file >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user