[llvm-commits] CVS: llvm/include/llvm/System/Path.h

Reid Spencer reid at x10sys.com
Mon Dec 13 09:02:07 PST 2004



Changes in directory llvm/include/llvm/System:

Path.h updated: 1.14 -> 1.15
---
Log message:

For PR351: http://llvm.cs.uiuc.edu/PR351 : \
The getFileTimestamp and getFileSize functions have been removed from  \
FileUtilities.{h,cpp}. They are replaced by Path::getTimestamp and  \
Path::getSize,respectively.

---
Diffs of the changes:  (+15 -0)

Index: llvm/include/llvm/System/Path.h
diff -u llvm/include/llvm/System/Path.h:1.14 llvm/include/llvm/System/Path.h:1.15
--- llvm/include/llvm/System/Path.h:1.14	Mon Dec 13 00:57:15 2004
+++ llvm/include/llvm/System/Path.h	Mon Dec 13 11:01:53 2004
@@ -376,6 +376,21 @@
       /// @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 






More information about the llvm-commits mailing list