summaryrefslogtreecommitdiff
path: root/include/llvm/Support/FileUtilities.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-12-30 07:35:47 +0000
committerChris Lattner <sabre@nondot.org>2003-12-30 07:35:47 +0000
commit9c4c66e70ea30a9bffeeac446d6d5294d1098198 (patch)
treea6ab242bdaae9fa76021b744a14c20a76c561c6c /include/llvm/Support/FileUtilities.h
parent74295c01641f10bd229929acd4a465f2860aa644 (diff)
downloadllvm-9c4c66e70ea30a9bffeeac446d6d5294d1098198.tar.gz
llvm-9c4c66e70ea30a9bffeeac446d6d5294d1098198.tar.bz2
llvm-9c4c66e70ea30a9bffeeac446d6d5294d1098198.tar.xz
Add new function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10648 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/FileUtilities.h')
-rw-r--r--include/llvm/Support/FileUtilities.h41
1 files changed, 13 insertions, 28 deletions
diff --git a/include/llvm/Support/FileUtilities.h b/include/llvm/Support/FileUtilities.h
index b17bca9e99..c765efae0f 100644
--- a/include/llvm/Support/FileUtilities.h
+++ b/include/llvm/Support/FileUtilities.h
@@ -70,37 +70,22 @@ void removeFile(const std::string &Filename);
///
std::string getUniqueFilename(const std::string &FilenameBase);
+/// MakeFileExecutable - This method turns on whatever access attributes are
+/// needed to make the specified file executable. It returns true on success.
+/// In case of failure, the file's access attributes are unspecified.
///
-/// Method: MakeFileExecutable()
-///
-/// Description:
-/// This method turns on whatever access attributes are needed to make the
-/// specified file executable.
-///
-/// Return value:
-/// True - The operation succeeded.
-/// False - The operation failed.
-///
-/// Notes:
-/// In case of failure, the file's access attributes are unspecified.
-///
-bool MakeFileExecutable (const std::string & Filename);
+bool MakeFileExecutable(const std::string &Filename);
+/// MakeFileReadable - This method turns on whatever access attributes are
+/// needed to make the specified file readable. It returns true on success.
+/// In case of failure, the file's access attributes are unspecified.
///
-/// Method: MakeFileReadable()
-///
-/// Description:
-/// This method turns on whatever access attributes are needed to make the
-/// specified file readable.
-///
-/// Return value:
-/// True - The operation succeeded.
-/// False - The operation failed.
-///
-/// Notes:
-/// In case of failure, the file's access attributes are unspecified.
-///
-bool MakeFileReadable (const std::string & Filename);
+bool MakeFileReadable(const std::string &Filename);
+
+/// getFileSize - Return the size of the specified file in bytes, or -1 if the
+/// file cannot be read or does not exist.
+long long getFileSize(const std::string &Filename);
+
/// FDHandle - Simple handle class to make sure a file descriptor gets closed