X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/21f60945831a6edad0f2101b6053a2c8213d5296..82ce8b17f728fe648f431b379ba23721e0ebc06d:/docs/latex/wx/filename.tex diff --git a/docs/latex/wx/filename.tex b/docs/latex/wx/filename.tex index d739dcd8dc..deef7473ff 100644 --- a/docs/latex/wx/filename.tex +++ b/docs/latex/wx/filename.tex @@ -6,7 +6,7 @@ %% Created: 30.11.01 %% RCS-ID: $Id$ %% Copyright: (c) 2001 Vadim Zeitlin -%% License: wxWindows license +%% License: wxWidgets license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{\class{wxFileName}}\label{wxfilename} @@ -14,7 +14,7 @@ wxFileName encapsulates a file name. This class serves two purposes: first, it provides the functions to split the file names into components and to recombine these components in the full file name which can then be passed to the OS file -functions (and \helpref{wxWindows functions}{filefunctions} wrapping them). +functions (and \helpref{wxWidgets functions}{filefunctions} wrapping them). Second, it includes the functions for working with the files itself. Note that to change the file data you should use \helpref{wxFile}{wxfile} class instead. wxFileName provides functions for working with the file attributes. @@ -23,6 +23,10 @@ wxFileName provides functions for working with the file attributes. No base class +\wxheading{Include files} + + + \wxheading{Data structures} Many wxFileName methods accept the path format argument which is by\rtfsp @@ -52,7 +56,7 @@ enum wxPathFormat \latexignore{\rtfignore{\wxheading{Function groups}}} -\membersection{File name format} +\membersection{File name format}\label{filenameformat} wxFileName currently supports the file names in the Unix, DOS/Windows, Mac OS and VMS formats. Although these formats are quite different, wxFileName tries @@ -73,7 +77,7 @@ The rules for determining if the file name is absolute or relative also depends on the file name format and the only portable way to answer to this question is to use \helpref{IsAbsolute}{wxfilenameisabsolute} method. To ensure that the filename is absolute you may use \helpref{MakeAbsolute}{wxfilenamemakeabsolute}. -There is also an inverse function +There is also an inverse function \helpref{MakeRelativeTo}{wxfilenamemakerelativeto} which undoes what \helpref{Normalize(wxPATH\_NORM\_DOTS)}{wxfilenamenormalize} does. @@ -84,12 +88,12 @@ class are \helpref{GetVolumeSeparator}{wxfilenamegetvolumeseparator},\rtfsp \helpref{IsRelative}{wxfilenameisrelative} -\membersection{File name construction} +\membersection{File name construction}\label{filenameconstruction} TODO. -\membersection{File tests} +\membersection{File tests}\label{filetests} Before doing the other tests you should use \helpref{IsOk}{wxfilenameisok} to verify that the filename is well defined. If it is, @@ -101,7 +105,7 @@ File names should be compared using \helpref{SameAs}{wxfilenamesameas} method or \helpref{$==$}{wxfilenameoperatorequal}. -\membersection{File name components} +\membersection{File name components}\label{filenamecomponents} These functions allow to examine and modify the directories of the path: @@ -125,7 +129,7 @@ following functions: \helpref{SetVolume}{wxfilenamesetvolume}\\ -\membersection{Operations} +\membersection{Operations}\label{filenameoperations} These methods allow to work with the file creation, access and modification times. Note that not all filesystems under all platforms implement these times @@ -456,6 +460,15 @@ separators. \helpref{GetPathSeparator}{wxfilenamegetpathseparator} +\membersection{wxFileName::GetPathTerminators}\label{wxfilenamegetpathterminators} + +\func{static wxString}{GetPathTerminators}{\param{wxPathFormat }{format = wxPATH\_NATIVE}} + +Returns the string of characters which may terminate the path part. This is the +same as \helpref{GetPathSeparators}{wxfilenamegetpathseparators} except for VMS +path format where $]$ is used at the end of the path part. + + \membersection{wxFileName::GetShortPath}\label{wxfilenamegetshortpath} \constfunc{wxString}{GetShortPath}{\void} @@ -487,7 +500,7 @@ needed. \constfunc{wxString}{GetVolume}{\void} -Returns the string containing the volume for this file name, mepty if it +Returns the string containing the volume for this file name, empty if it doesn't have one or if the file system doesn't support volumes at all (for example, Unix). @@ -645,6 +658,7 @@ variables will be expanded in it. \docparam{flags}{The kind of normalization to do with the file name. It can be any or-combination of the following constants: + \begin{twocollist} \twocolitem{{\bf wxPATH\_NORM\_ENV\_VARS}}{replace env vars with their values} \twocolitem{{\bf wxPATH\_NORM\_DOTS}}{squeeze all .. and . and prepend cwd} @@ -655,7 +669,7 @@ any or-combination of the following constants: \twocolitem{{\bf wxPATH\_NORM\_SHORTCUT}}{resolve if it is a shortcut (Windows only)} \twocolitem{{\bf wxPATH\_NORM\_ALL}}{all of previous flags except \texttt{wxPATH\_NORM\_CASE}} \end{twocollist} -} +}% \docparam{cwd}{If not empty, this directory will be used instead of current working directory in normalization.} @@ -758,6 +772,18 @@ component is. The old contents of the strings pointed to by these parameters will be overwritten in any case (if the pointers are not {\tt NULL}). +\membersection{wxFileName::SplitVolume}\label{wxfilenamesplitvolume} + +\func{static void}{SplitVolume}{\param{const wxString\& }{fullpath}, \param{wxString* }{volume}, \param{wxString* }{path}, \param{wxPathFormat }{format = wxPATH\_NATIVE}} + +Splits the given \arg{fullpath} into the volume part (which may be empty) and +the pure path part, not containing any volume. + +\wxheading{See also} + +\helpref{SplitPath}{wxfilenamesplitpath} + + \membersection{wxFileName::Touch}\label{wxfilenametouch} \func{bool}{Touch}{\void}