aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/System
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-12-13 19:59:50 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-12-13 19:59:50 +0000
commit77cc91deaaa06913047869726d9d2890f951aba7 (patch)
tree8fa9cb332878a0e6ffffdbce0bd7ab470cf0c6ac /include/llvm/System
parentfcdd82e4a952aeedfa212f3b355bb1bb30887fb6 (diff)
downloadexternal_llvm-77cc91deaaa06913047869726d9d2890f951aba7.zip
external_llvm-77cc91deaaa06913047869726d9d2890f951aba7.tar.gz
external_llvm-77cc91deaaa06913047869726d9d2890f951aba7.tar.bz2
For PR351:
Implement three new functions to allow setting access/permission bits on the file referenced by a path. The makeReadable and makeExecutable methods replace the FileUtilities MakeFileReadable and MakeFileExecutable functions. The makeWritable function is new and provided for consistency since Path has a writable() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18907 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System')
-rw-r--r--include/llvm/System/Path.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h
index 57cbc6c..3731a9c 100644
--- a/include/llvm/System/Path.h
+++ b/include/llvm/System/Path.h
@@ -391,6 +391,22 @@ namespace sys {
StatusInfo info; getStatusInfo(info); return info.fileSize;
}
+ /// This method attempts to make the file referenced by the Path object
+ /// available for reading so that the readable() method will return true.
+ /// @brief Make the file readable;
+ void makeReadable();
+
+ /// This method attempts to make the file referenced by the Path object
+ /// available for writing so that the writable() method will return true.
+ /// @brief Make the file writable;
+ void makeWriteable();
+
+ /// This method attempts to make the file referenced by the Path object
+ /// available for execution so that the executable() method will return
+ /// true.
+ /// @brief Make the file readable;
+ void makeExecutable();
+
/// This method attempts to set the Path object to \p unverified_path
/// and interpret the name as a directory name. The \p unverified_path
/// is verified. If verification succeeds then \p unverified_path