| 1758 | } |
| 1759 | |
| 1760 | bool FileSystem::DirectoryExists(const char* path) |
| 1761 | { |
| 1762 | // has a path |
| 1763 | if (path[0] == '\0') |
| 1764 | return false; |
| 1765 | |
| 1766 | // convert to wide string |
| 1767 | const std::wstring wpath = GetWin32Path(path); |
| 1768 | if (wpath.empty()) |
| 1769 | return false; |
| 1770 | |
| 1771 | // determine attributes for the path. if it's a directory, things have to be handled differently.. |
| 1772 | DWORD fileAttributes = GetFileAttributesW(wpath.c_str()); |
| 1773 | if (fileAttributes == INVALID_FILE_ATTRIBUTES) |
| 1774 | return false; |
| 1775 | |
| 1776 | if (fileAttributes & FILE_ATTRIBUTE_DIRECTORY) |
| 1777 | return true; |
| 1778 | else |
| 1779 | return false; |
| 1780 | } |
| 1781 | |
| 1782 | bool FileSystem::DirectoryIsEmpty(const char* path) |
| 1783 | { |
nothing calls this directly
no test coverage detected