From: Vadim Zeitlin Date: Tue, 11 Aug 1998 21:03:57 +0000 (+0000) Subject: static wxFile::Access() added (access() isn't ANSI neither...) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d4a00e065b5fdbd6686374210c98ef1a21424887 static wxFile::Access() added (access() isn't ANSI neither...) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/file.h b/include/wx/file.h index 11d935dacc..656ae52585 100644 --- a/include/wx/file.h +++ b/include/wx/file.h @@ -17,8 +17,10 @@ #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 // -----