1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxFileName documentation
4 %% Author: Vadim Zeitlin
8 %% Copyright: (c) 2001 Vadim Zeitlin
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxFileName
}}\label{wxfilename
}
14 wxFileName encapsulates a file name. This class serves two purposes: first, it
15 provides the functions to split the file names into components and to recombine
16 these components in the full file name which can then be passed to the OS file
17 functions (and
\helpref{wxWindows functions
}{filefunctions
} wrapping them).
18 Second, it includes the functions for working with the files itself. Note that
19 to change the file data you should use
\helpref{wxFile
}{wxfile
} class instead,
20 wxFileName provides functions for working with the file attributes.
22 \wxheading{Derived from
}
26 \wxheading{Data structures
}
28 Many wxFileName methods accept the path format argument which is by
\rtfsp
29 {\tt wxPATH
\_NATIVE} by default meaning to use the path format native for the
32 The path format affects the operation of wxFileName functions in several ways:
33 first and foremost, it defines the path separator character to use, but it also
34 affects other things such as whether the path has the drive part or not.
39 wxPATH_NATIVE =
0, // the path format for the current platform
45 wxPATH_BEOS = wxPATH_UNIX,
46 wxPATH_WIN = wxPATH_DOS,
47 wxPATH_OS2 = wxPATH_DOS
51 The kind of normalization to do with the file name: these values can be
52 or'd together to perform several operations at once in
\rtfsp
53 \helpref{Normalize
}{wxfilenamenormalize
}.
58 wxPATH_NORM_ENV_VARS =
0x0001, // replace env vars with their values
59 wxPATH_NORM_DOTS =
0x0002, // squeeze all .. and . and prepend cwd
60 wxPATH_NORM_TILDE =
0x0004, // Unix only: replace ~ and ~user
61 wxPATH_NORM_CASE =
0x0008, // if case insensitive => tolower
62 wxPATH_NORM_ABSOLUTE =
0x0010, // make the path absolute
63 wxPATH_NORM_LONG =
0x0020, // make the path the long form
64 wxPATH_NORM_ALL =
0x003f
68 \latexignore{\rtfignore{\wxheading{Function groups
}}}
70 \membersection{File name format
}
72 wxFileName currently supports the file names in the Unix, DOS/Windows, Mac OS
73 and VMS formats. Although these formats are quite different, wxFileName tries
74 to treat them all in the sam generic way. It supposes that all file names
75 consist of the following parts: the volume (also known as drive under Windows
76 or device under VMS), the path which is a sequence of directory names separated
77 by the
\helpref{path separators
}{wxfilenamegetpathseparators
} and the full
78 filename itself which, in turn, is composed from the base file name and the
79 extension. All of the individual components of the file name may be empty and,
80 for example, the volume name is always empty under Unix, but if they are all
81 empty simultaneously, the filename object is considered to be in an invalid
82 state and
\helpref{IsOk
}{wxfilenameisok
} returns
{\tt FALSE
} for it.
84 File names can be case-sensitive or not, the function
\rtfsp
85 \helpref{IsCaseSensitive
}{wxfilenameiscasesensitive
} allows to determine this.
87 The rules for determining if the file name is absolute or relative also depends
88 on the file name format and the only portable way to answer to this question is
89 to use
\helpref{IsAbsolute
}{wxfilenameisabsolute
} method. To ensure that the
90 filename is absolute you may use
\helpref{Normalize
}{wxfilenamenormalize
}. There
91 is also an inverse function
\helpref{MakeRelativeTo
}{wxfilenamemakerelativeto
}
92 which undoes what
\helpref{Normalize(wxPATH
\_NORM\_DOTS}{wxfilenamenormalize
}
95 Other functions returning information about the file format provided by this
96 class are
\helpref{GetVolumeSeparator
}{wxfilenamegetvolumeseparator
},
\rtfsp
97 \helpref{IsPathSeparator
}{wxfilenameispathseparator
}.
99 \helpref{IsRelative
}{wxfilenameisrelative
}
101 \membersection{File name construction
}
105 \membersection{File tests
}
107 Before doing the other tests you should use
\helpref{IsOk
}{wxfilenameisok
} to
108 verify that the filename is well defined. If it is,
109 \helpref{FileExists
}{wxfilenamefileexists
} can be used to test if a file with
110 such name exists and
\helpref{DirExists
}{wxfilenamedirexists
} - if a directory
111 with this name exists.
113 File names should be compared using
\helpref{SameAs
}{wxfilenamesameas
} method
114 or
\helpref{$==$
}{wxfilenameoperatorequal
}.
116 \membersection{File name components
}
118 These functions allow to examine and modify the directories of the path:
120 \helpref{AppendDir
}{wxfilenameappenddir
}\\
121 \helpref{InsertDir
}{wxfilenameinsertdir
}\\
122 \helpref{GetDirCount
}{wxfilenamegetdircount
}
123 \helpref{PrependDir
}{wxfilenameprependdir
}\\
124 \helpref{RemoveDir
}{wxfilenameremovedir
}
126 To change the components of the file name individually you can use the
129 \helpref{GetExt
}{wxfilenamegetext
}\\
130 \helpref{GetName
}{wxfilenamegetname
}\\
131 \helpref{GetVolume
}{wxfilenamegetvolume
}\\
132 \helpref{HasExt
}{wxfilenamehasext
}\\
133 \helpref{HasName
}{wxfilenamehasname
}\\
134 \helpref{HasVolume
}{wxfilenamehasvolume
}\\
135 \helpref{SetExt
}{wxfilenamesetext
}\\
136 \helpref{SetName
}{wxfilenamesetname
}\\
137 \helpref{SetVolume
}{wxfilenamesetvolume
}\\
139 \membersection{Operations
}
141 These methods allow to work with the file creation, access and modification
142 times. Note that not all filesystems under all platforms implement these times
143 in the same way. For example, the access time under Windows has a resolution of
144 one day (so it is really the access date and not time). The access time may be
145 updated when the file is executed or not depending on the platform.
147 \helpref{GetModificationTime
}{wxfilenamegetmodificationtime
}\\
148 \helpref{GetTimes
}{wxfilenamegettimes
}\\
149 \helpref{SetTimes
}{wxfilenamesettimes
}\\
150 \helpref{Touch
}{wxfilenametouch
}
152 Other file system operations functions are:
154 \helpref{Mkdir
}{wxfilenamemkdir
}\\
155 \helpref{Rmdir
}{wxfilenamermdir
}
157 \latexignore{\rtfignore{\wxheading{Members
}}}
159 \membersection{wxFileName::wxFileName
}\label{wxfilenamewxfilename
}
161 \func{}{wxFileName
}{\void}
165 \func{}{wxFileName
}{\param{const wxFileName\&
}{filename
}}
169 \func{}{wxFileName
}{\param{const wxString\&
}{fullpath
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
171 From a full filename: if it terminates with a '/', a directory path
172 is contructed (the name will be empty), otherwise a file name and
173 extension are extracted from it
175 \func{}{wxFileName
}{\param{const wxString\&
}{path
},
\param{const wxString\&
}{name
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
177 Constructor from a directory name and a file name.
179 \func{}{wxFileName
}{\param{const wxString\&
}{path
},
\param{const wxString\&
}{name
},
\param{const wxString\&
}{ext
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
181 Constructor from a directory name, base file name and extension
183 \func{}{wxFileName
}{\param{const wxString\&
}{volume
},
\param{const wxString\&
}{path
},
\param{const wxString\&
}{name
},
\param{const wxString\&
}{ext
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
185 Constructor from a volume name, a directory name, base file name and extension
187 \membersection{wxFileName::AppendDir
}\label{wxfilenameappenddir
}
189 \func{void
}{AppendDir
}{\param{const wxString\&
}{dir
}}
192 \membersection{wxFileName::Assign
}\label{wxfilenameassign
}
194 \func{void
}{Assign
}{\param{const wxFileName\&
}{filepath
}}
196 \func{void
}{Assign
}{\param{const wxString\&
}{fullpath
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
198 \func{void
}{Assign
}{\param{const wxString\&
}{volume
},
\param{const wxString\&
}{path
},
\param{const wxString\&
}{name
},
\param{const wxString\&
}{ext
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
200 \func{void
}{Assign
}{\param{const wxString\&
}{path
},
\param{const wxString\&
}{name
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
202 \func{void
}{Assign
}{\param{const wxString\&
}{path
},
\param{const wxString\&
}{name
},
\param{const wxString\&
}{ext
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
205 \membersection{wxFileName::AssignCwd
}\label{wxfilenameassigncwd
}
207 \func{void
}{AssignCwd
}{\param{const wxString\&
}{volume = ""
}}
209 Makes this object refer to the current working directory on the specified
210 volume (or current volume if
{\it volume
} is empty).
214 \helpref{GetCwd
}{wxfilenamegetcwd
}
216 \membersection{wxFileName::AssignDir
}\label{wxfilenameassigndir
}
218 \func{void
}{AssignDir
}{\param{const wxString\&
}{dir
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
220 Set this file name object to the given directory name. The name and extension
223 \membersection{wxFileName::AssignHomeDir
}\label{wxfilenameassignhomedir
}
225 \func{void
}{AssignHomeDir
}{\void}
227 Set this file name object to the home directory.
229 \membersection{wxFileName::AssignTempFileName
}\label{wxfilenameassigntempfilename
}
231 \func{void
}{AssignTempFileName
}{\param{const wxString\&
}{prefix
},
\param{wxFile *
}{fileTemp =
{\tt NULL
}}}
233 The function calls
\helpref{CreateTempFileName
}{wxfilenamecreatetempfilename
} to
234 create a temporary file and sets this object to the name of the file. If a
235 temporary file couldn't be created, the object is put into the
\rtfsp
236 \helpref{invalid
}{wxfilenameisok
} state.
238 \membersection{wxFileName::Clear
}\label{wxfilenameclear
}
240 \func{void
}{Clear
}{\void}
242 Reset all components to default, uninitialized state.
244 \membersection{wxFileName::CreateTempFileName
}\label{wxfilenamecreatetempfilename
}
246 \func{static wxString
}{CreateTempFileName
}{\param{const wxString\&
}{prefix
},
\param{wxFile *
}{fileTemp =
{\tt NULL
}}}
248 Returns a temporary file name starting with the given
{\it prefix
}. If
249 the
{\it prefix
} is an absolute path, the temporary file is created in this
250 directory, otherwise it is created in the default system directory for the
251 temporary files or in the current directory.
253 If the function succeeds, the temporary file is actually created. If
\rtfsp
254 {\it fileTemp
} is not
{\tt NULL
}, this file will be opened using the name of
255 the temporary file. When possible, this is done in an atomic way ensuring that
256 no race condition occurs between the temporary file name generation and opening
257 it which could often lead to security compromise on the multiuser systems.
258 If
{\it fileTemp
} is
{\tt NULL
}, the file is only created, but not opened.
260 Under Unix, the temporary file will have read and write permissions for the
261 owner only to minimize the security problems.
263 \wxheading{Parameters
}
265 \docparam{prefix
}{Prefix to use for the temporary file name construction
}
267 \docparam{fileTemp
}{The file to open or
{\tt NULL
} to just get the name
}
269 \wxheading{Return value
}
271 The full temporary file name or an empty string on error.
273 \membersection{wxFileName::DirExists
}\label{wxfilenamedirexists
}
275 \func{bool
}{DirExists
}{\void}
277 \func{bool
}{DirExists
}{\param{const wxString\&
}{dir
}}
279 Does the directory with this name exists?
281 \membersection{wxFileName::DirName
}\label{wxfilenamedirname
}
283 \func{wxFileName
}{DirName
}{\param{const wxString\&
}{dir
}}
285 \membersection{wxFileName::FileExists
}\label{wxfilenamefileexists
}
287 \func{bool
}{FileExists
}{\void}
289 \func{bool
}{FileExists
}{\param{const wxString\&
}{file
}}
291 Does the file with this name exists?
293 \membersection{wxFileName::FileName
}\label{wxfilenamefilename
}
295 \func{wxFileName
}{FileName
}{\param{const wxString\&
}{file
}}
297 static pseudo constructors
299 \membersection{wxFileName::GetCwd
}\label{wxfilenamegetcwd
}
301 \func{wxString
}{GetCwd
}{\param{const wxString\&
}{volume = ""
}}
303 Retrieve the value of the current working directory on the specified volume. If
304 the volume is empty, the programs current working directory is returned for the
307 \wxheading{Return value
}
309 The string containing the current working directory or an empty string on
314 \helpref{AssignCwd
}{wxfilenameassigncwd
}
316 \membersection{wxFileName::GetDirCount
}\label{wxfilenamegetdircount
}
318 \constfunc{size
\_t}{GetDirCount
}{\void}
321 \membersection{wxFileName::GetDirs
}\label{wxfilenamegetdirs
}
323 \constfunc{const wxArrayString\&
}{GetDirs
}{\void}
326 \membersection{wxFileName::GetExt
}\label{wxfilenamegetext
}
328 \constfunc{wxString
}{GetExt
}{\void}
331 \membersection{wxFileName::GetFormat
}\label{wxfilenamegetformat
}
333 \func{wxPathFormat
}{GetFormat
}{\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
336 get the canonical path format for this platform
339 \membersection{wxFileName::GetFullName
}\label{wxfilenamegetfullname
}
341 \constfunc{wxString
}{GetFullName
}{\void}
344 \membersection{wxFileName::GetFullPath
}\label{wxfilenamegetfullpath
}
346 \constfunc{wxString
}{GetFullPath
}{\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
348 add separator Construct full path with name and ext
351 \membersection{wxFileName::GetHomeDir
}\label{wxfilenamegethomedir
}
353 \func{wxString
}{GetHomeDir
}{\void}
356 \membersection{wxFileName::GetLongPath
}\label{wxfilenamegetlongpath
}
358 \constfunc{wxString
}{GetLongPath
}{\void}
360 Return the long form of the path (returns identity on non-Windows platforms)
363 \membersection{wxFileName::GetModificationTime
}\label{wxfilenamegetmodificationtime
}
365 \constfunc{wxDateTime
}{GetModificationTime
}{\void}
367 convenience wrapper: get just the last mod time of the file
370 \membersection{wxFileName::GetName
}\label{wxfilenamegetname
}
372 \constfunc{wxString
}{GetName
}{\void}
375 \membersection{wxFileName::GetPath
}\label{wxfilenamegetpath
}
377 \constfunc{wxString
}{GetPath
}{\param{int
}{flags = $
0$
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
379 Return the path part of the filename (without the name nor extension). The
380 possible flags values are:
383 \begin{twocollist
}\itemsep=
0pt
384 \twocolitem{{\bf wxPATH
\_GET\_VOLUME}}{Return the path with the volume (does
385 nothing for the filename formats without volumes)
}
386 \twocolitem{{\bf wxPATH
\_GET\_SEPARATOR}}{Return the path with the trailing
387 separator, if this flag is not given there will be no separator at the end of
391 \membersection{wxFileName::GetPathSeparator
}\label{wxfilenamegetpathseparator
}
393 \func{wxChar
}{GetPathSeparator
}{\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
395 Return the usually used path separator for this format. For all formats but
396 {\tt wxPATH
\_DOS} there is only one path separator anyhow, but for DOS there
397 are two of them and the native one, i.e. the backslash is returned by this
402 \helpref{GetPathSeparators
}{wxfilenamegetpathseparators
}
404 \membersection{wxFileName::GetPathSeparators
}\label{wxfilenamegetpathseparators
}
406 \func{wxString
}{GetPathSeparators
}{\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
408 Get the string containing all the path separators for this format. For all
409 formats but
{\tt wxPATH
\_DOS} this string contains only one character but for
410 DOS and Windows both
{\tt '/'
} and
{\tt '
\textbackslash'
} may be used as
415 \helpref{GetPathSeparator
}{wxfilenamegetpathseparator
}
417 \membersection{wxFileName::GetPathWithSep
}\label{wxfilenamegetpathwithsep
}
419 \constfunc{wxString
}{GetPathWithSep
}{\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
421 more readable synonym
424 \membersection{wxFileName::GetShortPath
}\label{wxfilenamegetshortpath
}
426 \constfunc{wxString
}{GetShortPath
}{\void}
428 Return the short form of the path (returns identity on non-Windows platforms)
431 \membersection{wxFileName::GetTimes
}\label{wxfilenamegettimes
}
433 \constfunc{bool
}{GetTimes
}{\param{wxDateTime*
}{dtAccess
},
\param{wxDateTime*
}{dtMod
},
\param{wxDateTime*
}{dtCreate
}}
435 Return the last access, last modification and creation times. The last access
436 time is updated whenever the file is read or written (or executed in the case
437 of Windows), last modification time is only changed when the file is written
438 to. Finally, the creation time is indeed the time when the file was created
439 under Windows and the inode change time under Unix (as it is impossible to
440 retrieve the real file creation time there anyhow) which can also be changed
441 by many operations after the file creation.
443 Aany of the pointers may be
{\tt NULL
} if the corresponding time is not
446 \wxheading{Return value
}
448 {\tt TRUE
} on success,
{\tt FALSE
} if we failed to retrieve the times.
450 \membersection{wxFileName::GetVolume
}\label{wxfilenamegetvolume
}
452 \constfunc{wxString
}{GetVolume
}{\void}
454 Returns the string containing the volume for this file name, mepty if it
455 doesn't have one or if the file system doesn't support volumes at all (for
458 \membersection{wxFileName::GetVolumeSeparator
}\label{wxfilenamegetvolumeseparator
}
460 \func{wxString
}{GetVolumeSeparator
}{\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
462 get the string separating the volume from the path for this format
465 \membersection{wxFileName::HasExt
}\label{wxfilenamehasext
}
467 \constfunc{bool
}{HasExt
}{\void}
470 \membersection{wxFileName::HasName
}\label{wxfilenamehasname
}
472 \constfunc{bool
}{HasName
}{\void}
475 \membersection{wxFileName::HasVolume
}\label{wxfilenamehasvolume
}
477 \constfunc{bool
}{HasVolume
}{\void}
480 \membersection{wxFileName::InsertDir
}\label{wxfilenameinsertdir
}
482 \func{void
}{InsertDir
}{\param{int
}{before
},
\param{const wxString\&
}{dir
}}
485 \membersection{wxFileName::IsAbsolute
}\label{wxfilenameisabsolute
}
487 \func{bool
}{IsAbsolute
}{\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
489 is this filename absolute?
492 \membersection{wxFileName::IsCaseSensitive
}\label{wxfilenameiscasesensitive
}
494 \func{bool
}{IsCaseSensitive
}{\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
497 are the file names of this type cases sensitive?
500 \membersection{wxFileName::IsOk
}\label{wxfilenameisok
}
502 \constfunc{bool
}{IsOk
}{\void}
504 Returns
{\tt TRUE
} if the filename is valid,
{\tt FALSE
} if it is not
505 initialized yet. The assignment functions and
506 \helpref{Clear
}{wxfilenameclear
} may reset the object to the uninitialized,
507 invalid state (the former only do it on failure).
509 \membersection{wxFileName::IsPathSeparator
}\label{wxfilenameispathseparator
}
511 \func{bool
}{IsPathSeparator
}{\param{wxChar
}{ch
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
513 Returns
{\tt TRUE
} if the char is a path separator for this format.
515 \membersection{wxFileName::IsRelative
}\label{wxfilenameisrelative
}
517 \func{bool
}{IsRelative
}{\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
519 Returns
{\tt TRUE
} if this filename is not absolute.
521 \membersection{wxFileName::IsDir
}\label{wxfilenameisdir
}
523 \constfunc{bool
}{IsDir
}{\void}
525 Returns
{\tt TRUE
} if this object represents a directory,
{\tt FALSE
} otherwise
526 (i.e. if it is a file). Note that this method doesn't test whether the
527 directory or file really exists, you should use
528 \helpref{DirExists
}{wxfilenamedirexists
} or
529 \helpref{FileExists
}{wxfilenamefileexists
} for this.
531 \membersection{wxFileName::MakeRelativeTo
}\label{wxfilenamemakerelativeto
}
533 \func{bool
}{MakeRelativeTo
}{\param{const wxString\&
}{pathBase = ""
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
535 This function tries to put this file name in a form relative to
{\it pathBase
}.
536 In other words, it returns the file name which should be used to access this
537 file if the current directory were
{\it pathBase
}.
539 \docparam{pathBase
}{the directory to use as root, current directory is used by
542 \docparam{format
}{the file name format, native by default
}
544 \wxheading{Return value
}
546 {\tt TRUE
} if the file name has been changed,
{\tt FALSE
} if we failed to do
547 anything with it (currently this only happens if the file name is on a volume
548 different from the volume specified by
{\it pathBase
}).
552 \helpref{Normalize
}{wxfilenamenormalize
}
554 \membersection{wxFileName::Mkdir
}\label{wxfilenamemkdir
}
556 \func{bool
}{Mkdir
}{\param{int
}{perm =
0777},
\param{int
}{flags = $
0$
}}
558 \func{static bool
}{Mkdir
}{\param{const wxString\&
}{dir
},
\param{int
}{perm =
0777},
\param{int
}{flags = $
0$
}}
560 \docparam{dir
}{the directory to create
}
562 \docparam{parm
}{the permissions for the newly created directory
}
564 \docparam{flags
}{if the flags contain
{\tt wxPATH
\_MKDIR\_FULL} flag,
565 try to create each directory in the path and also don't return an error
566 if the target directory already exists.
}
568 \wxheading{Return value
}
570 Returns
{\tt TRUE
} if the directory was successfully created,
{\tt FALSE
}
573 \membersection{wxFileName::Normalize
}\label{wxfilenamenormalize
}
575 \func{bool
}{Normalize
}{\param{int
}{flags = wxPATH
\_NORM\_ALL},
\param{const wxString\&
}{cwd = wxEmptyString
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
577 operations on the path
578 normalize the path: with the default flags value, the path will be
579 made absolute, without any ".." and "." and all environment
580 variables will be expanded in it
581 this may be done using another (than current) value of cwd
584 \membersection{wxFileName::PrependDir
}\label{wxfilenameprependdir
}
586 \func{void
}{PrependDir
}{\param{const wxString\&
}{dir
}}
589 \membersection{wxFileName::RemoveDir
}\label{wxfilenameremovedir
}
591 \func{void
}{RemoveDir
}{\param{int
}{pos
}}
594 \membersection{wxFileName::Rmdir
}\label{wxfilenamermdir
}
596 \func{bool
}{Rmdir
}{\void}
598 \func{static bool
}{Rmdir
}{\param{const wxString\&
}{dir
}}
600 Deletes the specified directory.
603 \membersection{wxFileName::SameAs
}\label{wxfilenamesameas
}
605 \func{bool
}{SameAs
}{\param{const wxFileName\&
}{filepath
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
607 Compares the filename using the rules of this platform
610 \membersection{wxFileName::SetCwd
}\label{wxfilenamesetcwd
}
612 \func{bool
}{SetCwd
}{\void}
614 \func{static bool
}{SetCwd
}{\param{const wxString\&
}{cwd
}}
616 change the current working directory
618 \membersection{wxFileName::SetExt
}\label{wxfilenamesetext
}
620 \func{void
}{SetExt
}{\param{const wxString\&
}{ext
}}
623 \membersection{wxFileName::SetFullName
}\label{wxfilenamesetfullname
}
625 \func{void
}{SetFullName
}{\param{const wxString\&
}{fullname
}}
627 full name is the file name + extension (but without the path)
630 \membersection{wxFileName::SetName
}\label{wxfilenamesetname
}
632 \func{void
}{SetName
}{\param{const wxString\&
}{name
}}
635 \membersection{wxFileName::SetTimes
}\label{wxfilenamesettimes
}
637 \func{bool
}{SetTimes
}{\param{const wxDateTime*
}{dtAccess
},
\param{const wxDateTime*
}{dtMod
},
\param{const wxDateTime*
}{dtCreate
}}
639 set the file creation and last access/mod times
640 (any of the pointers may be NULL)
643 \membersection{wxFileName::SetVolume
}\label{wxfilenamesetvolume
}
645 \func{void
}{SetVolume
}{\param{const wxString\&
}{volume
}}
648 \membersection{wxFileName::SplitPath
}\label{wxfilenamesplitpath
}
650 \func{void
}{SplitPath
}{\param{const wxString\&
}{fullpath
},
\param{wxString*
}{volume
},
\param{wxString*
}{path
},
\param{wxString*
}{name
},
\param{wxString*
}{ext
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
652 \func{void
}{SplitPath
}{\param{const wxString\&
}{fullpath
},
\param{wxString*
}{path
},
\param{wxString*
}{name
},
\param{wxString*
}{ext
},
\param{wxPathFormat
}{format = wxPATH
\_NATIVE}}
654 split a fullpath into the volume, path, (base) name and extension
655 (all of the pointers can be NULL)
657 \membersection{wxFileName::Touch
}\label{wxfilenametouch
}
659 \func{bool
}{Touch
}{\void}
661 set the access and modification times to the current moment
664 \membersection{wxFileName::operator=
}\label{wxfilenameoperatorassign
}
666 \func{wxFileName\& operator
}{operator=
}{\param{const wxFileName\&
}{filename
}}
668 \func{wxFileName\& operator
}{operator=
}{\param{const wxString\&
}{filename
}}
670 Assigns the new value to this filename object.
672 \membersection{wxFileName::operator==
}\label{wxfilenameoperatorequal
}
674 \func{bool operator
}{operator==
}{\param{const wxFileName\&
}{filename
}}
676 \func{bool operator
}{operator==
}{\param{const wxString\&
}{filename
}}
678 Returns
{\tt TRUE
} if the filenames are equal for the native file format.