mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Remove some now-dead methods. Use getFileStatus instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29447 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -216,39 +216,6 @@ Path::GetUserHomeDirectory() {
|
||||
}
|
||||
// FIXME: the above set of functions don't map to Windows very well.
|
||||
|
||||
bool
|
||||
Path::isFile() const {
|
||||
WIN32_FILE_ATTRIBUTE_DATA fi;
|
||||
BOOL rc = GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi);
|
||||
if (rc)
|
||||
return !(fi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
|
||||
else if (GetLastError() != ERROR_FILE_NOT_FOUND) {
|
||||
ThrowError("isFile(): " + std::string(path) + ": Can't get status: ");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
Path::isDirectory() const {
|
||||
WIN32_FILE_ATTRIBUTE_DATA fi;
|
||||
BOOL rc = GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi);
|
||||
if (rc)
|
||||
return fi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY;
|
||||
else if (GetLastError() != ERROR_FILE_NOT_FOUND)
|
||||
ThrowError("isDirectory(): " + std::string(path) + ": Can't get status: ");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
Path::isHidden() const {
|
||||
WIN32_FILE_ATTRIBUTE_DATA fi;
|
||||
BOOL rc = GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi);
|
||||
if (rc)
|
||||
return fi.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN;
|
||||
else if (GetLastError() != ERROR_FILE_NOT_FOUND)
|
||||
ThrowError("isHidden(): " + std::string(path) + ": Can't get status: ");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
Path::isRootDirectory() const {
|
||||
|
Reference in New Issue
Block a user