Added WindowsFileSystem::IsDirectory
assiduous
3 years ago
51 | 51 |
static void ClearDirectory(const Diligent::Char* strPath, bool Recursive = false);
|
52 | 52 |
static void DeleteFile(const Diligent::Char* strPath);
|
53 | 53 |
static void DeleteDirectory(const Diligent::Char* strPath);
|
|
54 |
static bool IsDirectory(const Diligent::Char* strPath);
|
54 | 55 |
|
55 | 56 |
static std::vector<std::unique_ptr<FindFileData>> Search(const Diligent::Char* SearchPattern);
|
56 | 57 |
|
287 | 287 |
}
|
288 | 288 |
return FileName;
|
289 | 289 |
}
|
|
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 |
}
|