X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d2c2afc91be4bdb6e036516785f334ddb54afa0c..1a87edf286921de9b182f3d19adb6bb63ba85ebd:/docs/latex/wx/filename.tex diff --git a/docs/latex/wx/filename.tex b/docs/latex/wx/filename.tex index dbd88c6e45..2270beb009 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 @@ -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,15 +105,17 @@ 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: +These functions allow to examine and modify the individual directories of the +path: \helpref{AppendDir}{wxfilenameappenddir}\\ \helpref{InsertDir}{wxfilenameinsertdir}\\ \helpref{GetDirCount}{wxfilenamegetdircount} \helpref{PrependDir}{wxfilenameprependdir}\\ -\helpref{RemoveDir}{wxfilenameremovedir} +\helpref{RemoveDir}{wxfilenameremovedir}\\ +\helpref{RemoveLastDir}{wxfilenameremovelastdir} To change the components of the file name individually you can use the following functions: @@ -125,7 +131,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 +462,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 +502,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). @@ -522,7 +537,7 @@ Returns {\tt true} if a volume specifier is present. \membersection{wxFileName::InsertDir}\label{wxfilenameinsertdir} -\func{void}{InsertDir}{\param{int }{before}, \param{const wxString\& }{dir}} +\func{void}{InsertDir}{\param{size\_t }{before}, \param{const wxString\& }{dir}} Inserts a directory component before the zero-based position in the directory list. Please see \helpref{AppendDir}{wxfilenameappenddir} for important notes. @@ -576,6 +591,23 @@ directory or file really exists, you should use \helpref{DirExists}{wxfilenamedirexists} or \helpref{FileExists}{wxfilenamefileexists} for this. +\membersection{wxFileName::MacFindDefaultTypeAndCreator}\label{wxfilenamemacfinddefaulttypeandcreator} + +\func{static bool}{MacFindDefaultTypeAndCreator}{\param{const wxString\& }{ext}, \param{wxUint32* }{type}, \param{wxUint32* }{creator}} + +On Mac OS, gets the common type and creator for the given extension. + +\membersection{wxFileName::MacRegisterDefaultTypeAndCreator}\label{wxfilenamemacregisterdefaulttypeandcreator} + +\func{static void}{MacRegisterDefaultTypeAndCreator}{\param{const wxString\& }{ext}, \param{wxUint32 }{type}, \param{wxUint32 }{creator}} + +On Mac OS, registers application defined extensions and their default type and creator. + +\membersection{wxFileName::MacSetDefaultTypeAndCreator}\label{wxfilenamemacsetdefaulttypeandcreator} + +\func{bool}{MacSetDefaultTypeAndCreator}{\void} + +On Mac OS, looks up the appropriate type and creator from the registration and then sets it. \membersection{wxFileName::MakeAbsolute}\label{wxfilenamemakeabsolute} @@ -675,9 +707,20 @@ Prepends a directory to the file path. Please see \membersection{wxFileName::RemoveDir}\label{wxfilenameremovedir} -\func{void}{RemoveDir}{\param{int }{pos}} +\func{void}{RemoveDir}{\param{size\_t }{pos}} -Removes a directory name. +Removes the specified directory component from the path. + +\wxheading{See also} + +\helpref{GetDirCount}{wxfilenamegetdircount} + + +\membersection{wxFileName::RemoveLastDir}\label{wxfilenameremovelastdir} + +\func{void}{RemoveLastDir}{\void} + +Removes last directory component from the path. \membersection{wxFileName::Rmdir}\label{wxfilenamermdir} @@ -759,6 +802,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}