git.s-ol.nu forks/DiligentCore / c43f5b3
Added WindowsFileSystem::IsDirectory assiduous 3 years ago
2 changed file(s) with 12 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
5151 static void ClearDirectory(const Diligent::Char* strPath, bool Recursive = false);
5252 static void DeleteFile(const Diligent::Char* strPath);
5353 static void DeleteDirectory(const Diligent::Char* strPath);
54 static bool IsDirectory(const Diligent::Char* strPath);
5455
5556 static std::vector<std::unique_ptr<FindFileData>> Search(const Diligent::Char* SearchPattern);
5657
287287 }
288288 return FileName;
289289 }
290
291 bool WindowsFileSystem::IsDirectory(const Diligent::Char* strPath)
292 {
293 if (!PathExists(strPath))
294 {
295 LOG_WARNING_MESSAGE("Path '", strPath, "' does not exist. Use PathExists function to check if path exists.");
296 return false;
297 }
298
299 return (GetFileAttributesA(strPath) & FILE_ATTRIBUTE_DIRECTORY) != 0;
300 }