]> git.lyx.org Git - lyx.git/blobdiff - src/support/FileInfo.h
export patch from Dekel
[lyx.git] / src / support / FileInfo.h
index 9093601b1cec79f2be70e6568a589b87a87c8acd..b2f8caad182a92e9ef83c54d3e07c7e7cad4b4f3 100644 (file)
@@ -5,13 +5,17 @@
  *           LyX, The Document Processor
  *        
  *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-1999 The LyX Team.
+ *           Copyright 1995-2000 The LyX Team.
  *
- * ======================================================*/
+ * ====================================================== */
 
 #ifndef FILE_INFO_H
 #define FILE_INFO_H
 
+#ifdef __GNUG__
+#pragma interface
+#endif
+
 #include <ctime>
 
 #include <unistd.h>
@@ -20,7 +24,8 @@
 
 #include "LString.h"
 
-/** Use objects of this class to get information about files. */
+/** Use objects of this class to get information about files.
+ */
 class FileInfo {
 public:
        ///
@@ -29,9 +34,11 @@ public:
        /** 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. */
+       explicit
        FileInfo(string const & path, bool link = false);
 
        /// File descriptor
+       explicit
        FileInfo(int fildes);
 
        /// Query a new file
@@ -46,9 +53,6 @@ public:
        /// File protection mode
        mode_t getMode() const;
 
-       /// Get "preferred" block size for efficient file system I/O
-       long getBlockSize() const;
-       
        /// Constructs standard mode string (ls style)
        void modeString(char * szString) const;
        
@@ -87,10 +91,14 @@ public:
        
        /// Permission flags
        enum perm_test {
-               rperm = R_OK, // test for read permission
-               wperm = W_OK, // test for write permission
-               xperm = X_OK, // test for execute (search) permission
-               eperm = F_OK  // test for existence of file
+               /// test for read permission
+               rperm = R_OK,
+               /// test for write permission
+               wperm = W_OK,
+               /// test for execute (search) permission
+               xperm = X_OK,
+               /// test for existence of file
+               eperm = F_OK
        };
        /// Test whether the current user has a given set of permissions
        bool access(int p);
@@ -119,7 +127,7 @@ public:
        ///
        int getError() const;
        ///
-       enum {
+       enum Err {
                ///
                NoErr = -1
        };