aboutsummaryrefslogtreecommitdiff
path: root/lib/System
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-07-28 22:32:09 +0000
committerChris Lattner <sabre@nondot.org>2006-07-28 22:32:09 +0000
commit7dea1019c1dcf2f9198397ca290784db092b75af (patch)
treec274ec7850f4cec0985c1b1f1dd63a572db227b5 /lib/System
parent0c33231eff17edbdabdb186e1fae718cf94b58b2 (diff)
Update win32 for Path::getStatusInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r--lib/System/Win32/Path.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc
index 15c686d264..a7c7d21bcf 100644
--- a/lib/System/Win32/Path.inc
+++ b/lib/System/Win32/Path.inc
@@ -333,11 +333,12 @@ Path::getLast() const {
return path.substr(pos+1);
}
-void
-Path::getStatusInfo(StatusInfo& info) const {
+bool
+Path::getStatusInfo(FileStatus &info, std::string *ErrStr) const {
WIN32_FILE_ATTRIBUTE_DATA fi;
if (!GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi))
- ThrowError("getStatusInfo():" + std::string(path) + ": Can't get status: ");
+ return GetError("getStatusInfo():" + std::string(path) +
+ ": Can't get status: ", ErrStr);
info.fileSize = fi.nFileSizeHigh;
info.fileSize <<= sizeof(fi.nFileSizeHigh)*8;
@@ -351,6 +352,7 @@ Path::getStatusInfo(StatusInfo& info) const {
info.modTime.fromWin32Time(ft);
info.isDir = fi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY;
+ return false;
}
static bool AddPermissionBits(const std::string& Filename, int bits) {
@@ -691,7 +693,7 @@ Path::renamePathOnDisk(const Path& newName) {
}
bool
-Path::setStatusInfoOnDisk(const StatusInfo& si) const {
+Path::setStatusInfoOnDisk(const FileStatus &si) const {
// FIXME: should work on directories also.
if (!isFile()) return false;