]> git.lyx.org Git - lyx.git/blobdiff - src/support/FileInfo.C
Add string << operators for the other streams as well, and removes
[lyx.git] / src / support / FileInfo.C
index 1d2b9b88f4097f862db55551fe75c2cc4d7eb307..49b7ba2c21ba4cc50f88af5d724cb7d1b0c23fc0 100644 (file)
@@ -1,11 +1,10 @@
-// -*- C++ -*-
 /* This file is part of
  * ======================================================
  * 
  *           LyX, The Document Processor
  *        
  *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
+ *           Copyright 1995-2001 The LyX Team.
  *
  * ====================================================== */
 
@@ -15,8 +14,9 @@
 #pragma implementation
 #endif
 
-#include <sys/types.h>
-#include <sys/stat.h>
+//#include <sys/types.h>
+//#include <sys/stat.h>
+
 #include <cerrno>
 #include "FileInfo.h"
 
@@ -140,9 +140,9 @@ void FileInfo::init()
 void FileInfo::dostat(bool link)
 {
        if (link) {
-               status = lstat(fname.c_str(), &buf);
+               status = ::lstat(fname.c_str(), &buf);
        } else {
-               status = stat(fname.c_str(), &buf);
+               status = ::stat(fname.c_str(), &buf);
        }
        if (status) err = errno;
 }
@@ -237,7 +237,7 @@ char FileInfo::typeLetter() const
 
 
 // should not be in FileInfo
-void FileInfo::flagRWX(unsigned short i, char * szString) const
+void FileInfo::flagRWX(mode_t i, char * szString) const
 {
        szString[0] = (i & S_IRUSR) ? 'r' : '-';
        szString[1] = (i & S_IWUSR) ? 'w' : '-';
@@ -373,7 +373,7 @@ bool FileInfo::isSocket() const
 
 
 // should not be in FileInfo
-bool FileInfo::access(int p)
+bool FileInfo::access(int p) const
 {
        // if we don't have a filename we fail
        if (fname.empty()) return false;
@@ -386,3 +386,6 @@ bool FileInfo::access(int p)
                return false;
        }
 }
+
+
+