]> git.saurik.com Git - wxWidgets.git/commitdiff
static wxFile::Access() added (access() isn't ANSI neither...)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 11 Aug 1998 21:03:57 +0000 (21:03 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 11 Aug 1998 21:03:57 +0000 (21:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/file.h

index 11d935dacc5c9f22b87ca1a40802a77e50b004b9..656ae52585f8f29fe3d2fccc5a78db1ae63ea242 100644 (file)
 #pragma interface "file.h"
 #endif
 
-#include  "wx/string.h"
-#include  "wx/filefn.h"
+#ifndef WX_PRECOMP
+  #include  "wx/string.h"
+  #include  "wx/filefn.h"
+#endif
 
 // ----------------------------------------------------------------------------
 // constants
@@ -53,7 +55,6 @@ class WXDLLEXPORT wxFile
 public:
   // more file constants
   // -------------------
-
     // opening mode
   enum OpenMode { read, write, read_write, write_append };
     // standard values for file descriptor
@@ -61,7 +62,11 @@ public:
 
   // static functions
   // ----------------
-  static bool Exists(const char *sz);  // also checks it's a regular file
+    // check whether a regular file by this name exists
+  static bool Exists(const char *name);
+    // check whetther we can access the given file in given mode
+    // (only read and write make sense here)
+  static bool Access(const char *name, OpenMode mode);
 
   // ctors
   // -----