From 8e41796c6cb912b762276f14a75fbe014652b90b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 25 Jan 2003 12:01:57 +0000 Subject: [PATCH] File/DirExists() are const now git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/filename.tex | 12 ++++++++---- include/wx/filename.h | 4 ++-- src/common/filename.cpp | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/latex/wx/filename.tex b/docs/latex/wx/filename.tex index 444f29025e..a93a18c7ef 100644 --- a/docs/latex/wx/filename.tex +++ b/docs/latex/wx/filename.tex @@ -257,9 +257,9 @@ The full temporary file name or an empty string on error. \membersection{wxFileName::DirExists}\label{wxfilenamedirexists} -\func{bool}{DirExists}{\void} +\constfunc{bool}{DirExists}{\void} -\func{bool}{DirExists}{\param{const wxString\& }{dir}} +\func{static bool}{DirExists}{\param{const wxString\& }{dir}} Returns true if the directory with this name exists. @@ -271,12 +271,16 @@ Returns the directory name. \membersection{wxFileName::FileExists}\label{wxfilenamefileexists} -\func{bool}{FileExists}{\void} +\constfunc{bool}{FileExists}{\void} -\func{bool}{FileExists}{\param{const wxString\& }{file}} +\func{static bool}{FileExists}{\param{const wxString\& }{file}} Returns true if the file with this name exists. +\wxheading{See also} + +\helpref{DirExists}{wxfilenamedirexists} + \membersection{wxFileName::FileName}\label{wxfilenamefilename} \func{wxFileName}{FileName}{\param{const wxString\& }{file}} diff --git a/include/wx/filename.h b/include/wx/filename.h index 363ef72879..7e9ee03a7b 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -175,11 +175,11 @@ public: bool IsOk() const { return !m_dirs.IsEmpty() || !m_name.IsEmpty(); } // does the file with this name exists? - bool FileExists(); + bool FileExists() const; static bool FileExists( const wxString &file ); // does the directory with this name exists? - bool DirExists(); + bool DirExists() const; static bool DirExists( const wxString &dir ); // VZ: also need: IsDirWritable(), IsFileExecutable() &c (TODO) diff --git a/src/common/filename.cpp b/src/common/filename.cpp index f56ec3d5ef..c9a32ea669 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -461,7 +461,7 @@ wxFileName wxFileName::DirName(const wxString& dir) // existence tests // ---------------------------------------------------------------------------- -bool wxFileName::FileExists() +bool wxFileName::FileExists() const { return wxFileName::FileExists( GetFullPath() ); } @@ -471,7 +471,7 @@ bool wxFileName::FileExists( const wxString &file ) return ::wxFileExists( file ); } -bool wxFileName::DirExists() +bool wxFileName::DirExists() const { return wxFileName::DirExists( GetFullPath() ); } -- 2.47.2