]> git.lyx.org Git - features.git/blobdiff - src/support/FileInfo.h
LSubstring and LRegex added, some small cleanup in FileInfo, audited most of the...
[features.git] / src / support / FileInfo.h
index 4eeea35899059191df5f64261a7b0cc15e85bd5a..9093601b1cec79f2be70e6568a589b87a87c8acd 100644 (file)
@@ -25,27 +25,24 @@ class FileInfo {
 public:
        ///
        FileInfo();
-
+       
        /** Get information about file.
-       If link is true, the information is about the link itself, not
-       the file that is obtained by tracing the links. */
+           If link is true, the information is about the link itself, not
+           the file that is obtained by tracing the links. */
        FileInfo(string const & path, bool link = false);
 
        /// File descriptor
        FileInfo(int fildes);
 
-       ///
-       ~FileInfo();
-
        /// Query a new file
-       FileInfo& newFile(string const & path, bool link = false);
-
+       FileInfo & newFile(string const & path, bool link = false);
+       
        /// Query a new file descriptor
-        FileInfo& newFile(int fildes);
+        FileInfo & newFile(int fildes);
        
        /// Returns a character describing file type (ls -F)
        char const * typeIndicator() const;
-
+       
        /// File protection mode
        mode_t getMode() const;
 
@@ -63,31 +60,31 @@ public:
        
        /// updates mode string to match suid/sgid/sticky bits
        void setSticky(char * szString) const;
-
+       
        ///
        time_t getModificationTime() const;
-
+       
        ///
        time_t getAccessTime() const;
-
+       
        ///
        time_t getStatusChangeTime() const;
-
+       
        /// Total file size in bytes
        off_t getSize() const;
-
+       
        /// Number of hard links
        nlink_t getNumberOfLinks() const;
-
+       
        /// User ID of owner
        uid_t getUid() const;
-
+       
        /// Group ID of owner
        gid_t getGid() const;
-
+       
        /// Is the file information correct? Did the query succeed?
        bool isOK() const;
-
+       
        /// Permission flags
        enum perm_test {
                rperm = R_OK, // test for read permission
@@ -132,7 +129,7 @@ private:
        ///
        void dostat(bool);
        ///
-       struct stat buf;
+       struct stat buf;
        ///
        int status;
        ///