File/DirExists() are const now

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-01-25 12:01:57 +00:00
parent df861444a1
commit 8e41796c6c
3 changed files with 12 additions and 8 deletions

View File

@ -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}}

View File

@ -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)

View File

@ -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() );
}