diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-12-13 17:01:53 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-12-13 17:01:53 +0000 |
commit | 9d88d1aaab145e18c8e0fe93544f8a1ff0474866 (patch) | |
tree | 76878e5c34075b7fb47f4cc78dc6636840922da0 /include/llvm/System | |
parent | 4251ce4b10a35552df67ea624b180ad247960eef (diff) | |
download | external_llvm-9d88d1aaab145e18c8e0fe93544f8a1ff0474866.zip external_llvm-9d88d1aaab145e18c8e0fe93544f8a1ff0474866.tar.gz external_llvm-9d88d1aaab145e18c8e0fe93544f8a1ff0474866.tar.bz2 |
For PR351: \
The getFileTimestamp and getFileSize functions have been removed from \
FileUtilities.{h,cpp}. They are replaced by Path::getTimestamp and \
Path::getSize,respectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18892 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System')
-rw-r--r-- | include/llvm/System/Path.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h index 10c8bcc..57cbc6c 100644 --- a/include/llvm/System/Path.h +++ b/include/llvm/System/Path.h @@ -376,6 +376,21 @@ namespace sys { /// @brief Get file status. void getStatusInfo(StatusInfo& info) const; + /// This function returns the last modified time stamp for the file + /// referenced by this path. The Path may reference a file or a directory. + /// If the file does not exist, a ZeroTime timestamp is returned. + /// @returns last modified timestamp of the file/directory or ZeroTime + /// @brief Get file timestamp. + inline TimeValue getTimestamp() const { + StatusInfo info; getStatusInfo(info); return info.modTime; + } + + /// This function returns the size of the file referenced by this path. + /// @brief Get file size. + inline size_t getSize() const { + StatusInfo info; getStatusInfo(info); return info.fileSize; + } + /// 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 |