From faa3bd94f005f5b93871a0d696610f7572414277 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sun, 19 Nov 2006 21:08:57 +0000 Subject: [PATCH] Correct broken reference. Mention wxFileName::DirName() in the overview. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/filename.tex | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/latex/wx/filename.tex b/docs/latex/wx/filename.tex index 5b4d7bb230..ae471a7f2d 100644 --- a/docs/latex/wx/filename.tex +++ b/docs/latex/wx/filename.tex @@ -28,18 +28,26 @@ wxFileName dirname( wxT("C:\mydir"), wxEmptyString ); MyMethod( dirname.GetPath() ); \end{verbatim} +The same can be done using the static method \helpref{wxFileName::DirName}{wxfilenamedirname}: + +\begin{verbatim} +wxFileName dirname = wxFileName::DirName( wxT("C:\mydir") ); +MyMethod( dirname.GetPath() ); +\end{verbatim} + Accordingly, methods dealing with directories or directory names -like \helpref{IsDirReadable}{wxfilenameisdirreadale} use +like \helpref{IsDirReadable}{wxfilenameisdirreadable} use \helpref{GetPath}{wxfilenamegetpath} whereas methods dealing -with file names like \helpref{IsFileReadable}{wxfilenameisfilereadale} +with file names like \helpref{IsFileReadable}{wxfilenameisfilereadable} use \helpref{GetFullPath}{wxfilenamegetfullpath}. If it is not known wether a string contains a directory name or a complete file name (such as when interpreting user input) you need to use the static function \helpref{wxFileName::DirExists}{wxfilenamedirexists} -(or its global variant \helpref{wxDirExists}{wxdirexists}) and -construct the wxFileName instance accordingly. This will only work -if the directory actually exists, of course: +(or its identical variants \helpref{wxDir::Exists}{wxdirexists} and +\helpref{wxDirExists}{functionwxdirexists}) and construct the wxFileName +instance accordingly. This will only work if the directory actually exists, +of course: \begin{verbatim} wxString user_input; -- 2.47.2