summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Win32
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-07-07 18:21:42 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-07-07 18:21:42 +0000
commit5b891e98471ec8a21e3cd2182a322c77aad200bb (patch)
tree41dd8e6fcd6d4347ca4ed7e22e8f52386e0a0d39 /llvm/lib/System/Win32
parent2e81f65eb8c066ceb7f7eaa88abc37069ef4bc56 (diff)
downloadbcm5719-llvm-5b891e98471ec8a21e3cd2182a322c77aad200bb.tar.gz
bcm5719-llvm-5b891e98471ec8a21e3cd2182a322c77aad200bb.zip
For PR495:
Change interface to Path class: readable -> canRead writable -> canWrite executable -> canExecute More (incremental) changes coming to close 495. llvm-svn: 22345
Diffstat (limited to 'llvm/lib/System/Win32')
-rw-r--r--llvm/lib/System/Win32/Path.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/System/Win32/Path.inc b/llvm/lib/System/Win32/Path.inc
index d3c85916182..b9132da7f72 100644
--- a/llvm/lib/System/Win32/Path.inc
+++ b/llvm/lib/System/Win32/Path.inc
@@ -139,14 +139,14 @@ static void getPathList(const char*path, std::vector<sys::Path>& Paths) {
while( delim != 0 ) {
std::string tmp(at, size_t(delim-at));
if (tmpPath.setDirectory(tmp))
- if (tmpPath.readable())
+ if (tmpPath.canRead())
Paths.push_back(tmpPath);
at = delim + 1;
delim = strchr(at, ';');
}
if (*at != 0)
if (tmpPath.setDirectory(std::string(at)))
- if (tmpPath.readable())
+ if (tmpPath.canRead())
Paths.push_back(tmpPath);
}
@@ -167,7 +167,7 @@ Path::GetBytecodeLibraryPaths(std::vector<sys::Path>& Paths) {
{
Path tmpPath;
if (tmpPath.setDirectory(LLVM_LIBDIR))
- if (tmpPath.readable())
+ if (tmpPath.canRead())
Paths.push_back(tmpPath);
}
#endif
@@ -237,21 +237,21 @@ Path::exists() const {
}
bool
-Path::readable() const {
+Path::canRead() const {
// FIXME: take security attributes into account.
DWORD attr = GetFileAttributes(path.c_str());
return attr != INVALID_FILE_ATTRIBUTES;
}
bool
-Path::writable() const {
+Path::canWrite() const {
// FIXME: take security attributes into account.
DWORD attr = GetFileAttributes(path.c_str());
return (attr != INVALID_FILE_ATTRIBUTES) && !(attr & FILE_ATTRIBUTE_READONLY);
}
bool
-Path::executable() const {
+Path::canExecute() const {
// FIXME: take security attributes into account.
DWORD attr = GetFileAttributes(path.c_str());
return attr != INVALID_FILE_ATTRIBUTES;
OpenPOWER on IntegriCloud