]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/filename.tex
changed wxCondition API to take a reference, not pointer, to wxMutex
[wxWidgets.git] / docs / latex / wx / filename.tex
CommitLineData
2569938d
VZ
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: filename.tex
3%% Purpose: wxFileName documentation
4%% Author: Vadim Zeitlin
5%% Modified by:
6%% Created: 30.11.01
7%% RCS-ID: $Id$
8%% Copyright: (c) 2001 Vadim Zeitlin
9%% License: wxWindows license
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12\section{\class{wxFileName}}\label{wxfilename}
13
14wxFileName encapsulates a file name. This class serves two purposes: first, it
15provides the functions to split the file names into components and to recombine
16these components in the full file name which can then be passed to the OS file
17functions (and \helpref{wxWindows functions}{filefunctions} wrapping them).
18Second, it includes the functions for working with the files itself. Note that
19to change the file data you should use \helpref{wxFile}{wxfile} class instead,
20wxFileName provides functions for working with the file attributes.
21
22\wxheading{Derived from}
23
24No base class
25
26\wxheading{Data structures}
27
28Many 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
30current platform.
31
32The path format affects the operation of wxFileName functions in several ways:
33first and foremost, it defines the path separator character to use, but it also
34affects other things such as whether the path has the drive part or not.
35
36\begin{verbatim}
37enum wxPathFormat
38{
39 wxPATH_NATIVE = 0, // the path format for the current platform
40 wxPATH_UNIX,
41 wxPATH_MAC,
42 wxPATH_DOS,
43 wxPATH_VMS,
44
45 wxPATH_BEOS = wxPATH_UNIX,
46 wxPATH_WIN = wxPATH_DOS,
47 wxPATH_OS2 = wxPATH_DOS
48}
49\end{verbatim}
50
51The kind of normalization to do with the file name: these values can be
52or'd together to perform several operations at once in\rtfsp
53\helpref{Normalize}{wxfilenamenormalize}.
54
55\begin{verbatim}
56enum wxPathNormalize
57{
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
65}
66\end{verbatim}
67
6f91bc33
VZ
68\latexignore{\rtfignore{\wxheading{Function groups}}}
69
70\membersection{File name format}
71
72wxFileName currently supports the file names in the Unix, DOS/Windows, Mac OS
73and VMS formats. Although these formats are quite different, wxFileName tries
74to treat them all in the sam generic way. It supposes that all file names
75consist of the following parts: the volume (also known as drive under Windows
76or device under VMS), the path which is a sequence of directory names separated
77by the \helpref{path separators}{wxfilenamegetpathseparators} and the full
78filename itself which, in turn, is composed from the base file name and the
79extension. All of the individual components of the file name may be empty and,
80for example, the volume name is always empty under Unix, but if they are all
81empty simultaneously, the filename object is considered to be in an invalid
82state and \helpref{IsOk}{wxfilenameisok} returns {\tt FALSE} for it.
83
84File names can be case-sensitive or not, the function\rtfsp
85\helpref{IsCaseSensitive}{wxfilenameiscasesensitive} allows to determine this.
86
87The rules for determining if the file name is absolute or relative also depends
88on the file name format and the only portable way to answer to this question is
89to use \helpref{IsAbsolute}{wxfilenameisabsolute} method. To ensure that the
f7d886af
VZ
90filename is absolute you may use \helpref{Normalize}{wxfilenamenormalize}. There
91is also an inverse function \helpref{MakeRelativeTo}{wxfilenamemakerelativeto}
92which undoes what \helpref{Normalize(wxPATH\_NORM\_DOTS}{wxfilenamenormalize}
93does.
6f91bc33
VZ
94
95Other functions returning information about the file format provided by this
96class are \helpref{GetVolumeSeparator}{wxfilenamegetvolumeseparator},\rtfsp
97\helpref{IsPathSeparator}{wxfilenameispathseparator} and\rtfsp
98\helpref{IsWild}{wxfilenameiswild}.
99
100\helpref{IsRelative}{wxfilenameisrelative}
101
102\membersection{File name construction}
103
104TODO.
105
106\membersection{File tests}
107
108Before doing the other tests you should use \helpref{IsOk}{wxfilenameisok} to
109verify that the filename is well defined. If it is,
110\helpref{FileExists}{wxfilenamefileexists} can be used to test if a file with
111such name exists and \helpref{DirExists}{wxfilenamedirexists} - if a directory
112with this name exists.
113
114File names should be compared using \helpref{SameAs}{wxfilenamesameas} method
115or \helpref{$==$}{wxfilenameoperatorequal}.
116
117\membersection{File name components}
118
119These functions allow to examine and modify the directories of the path:
120
121\helpref{AppendDir}{wxfilenameappenddir}\\
122\helpref{InsertDir}{wxfilenameinsertdir}\\
123\helpref{GetDirCount}{wxfilenamegetdircount}
124\helpref{PrependDir}{wxfilenameprependdir}\\
125\helpref{RemoveDir}{wxfilenameremovedir}
126
127To change the components of the file name individually you can use the
128following functions:
129
130\helpref{GetExt}{wxfilenamegetext}\\
131\helpref{GetName}{wxfilenamegetname}\\
132\helpref{GetVolume}{wxfilenamegetvolume}\\
133\helpref{HasExt}{wxfilenamehasext}\\
134\helpref{HasName}{wxfilenamehasname}\\
135\helpref{HasVolume}{wxfilenamehasvolume}\\
136\helpref{SetExt}{wxfilenamesetext}\\
137\helpref{SetName}{wxfilenamesetname}\\
138\helpref{SetVolume}{wxfilenamesetvolume}\\
139
140\membersection{Operations}
141
142These methods allow to work with the file creation, access and modification
6dbb903b
VZ
143times. Note that not all filesystems under all platforms implement these times
144in the same way. For example, the access time under Windows has a resolution of
145one day (so it is really the access date and not time). The access time may be
146updated when the file is executed or not depending on the platform.
6f91bc33
VZ
147
148\helpref{GetModificationTime}{wxfilenamegetmodificationtime}\\
149\helpref{GetTimes}{wxfilenamegettimes}\\
150\helpref{SetTimes}{wxfilenamesettimes}\\
151\helpref{Touch}{wxfilenametouch}
152
153Other file system operations functions are:
154
155\helpref{Mkdir}{wxfilenamemkdir}\\
156\helpref{Rmdir}{wxfilenamermdir}
157
2569938d
VZ
158\latexignore{\rtfignore{\wxheading{Members}}}
159
6f91bc33 160\membersection{wxFileName::wxFileName}\label{wxfilenamewxfilename}
2569938d
VZ
161
162\func{}{wxFileName}{\void}
163
164Default constructor.
165
2569938d
VZ
166\func{}{wxFileName}{\param{const wxFileName\& }{filename}}
167
168Copy constructor.
169
2569938d
VZ
170\func{}{wxFileName}{\param{const wxString\& }{fullpath}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
171
6f91bc33 172From a full filename: if it terminates with a '/', a directory path
2569938d
VZ
173is contructed (the name will be empty), otherwise a file name and
174extension are extracted from it
175
2569938d
VZ
176\func{}{wxFileName}{\param{const wxString\& }{path}, \param{const wxString\& }{name}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
177
6f91bc33 178Constructor from a directory name and a file name.
2569938d
VZ
179
180\func{}{wxFileName}{\param{const wxString\& }{path}, \param{const wxString\& }{name}, \param{const wxString\& }{ext}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
181
81f25632
VZ
182Constructor from a directory name, base file name and extension
183
184\func{}{wxFileName}{\param{const wxString\& }{volume}, \param{const wxString\& }{path}, \param{const wxString\& }{name}, \param{const wxString\& }{ext}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
185
186Constructor from a volume name, a directory name, base file name and extension
2569938d
VZ
187
188\membersection{wxFileName::AppendDir}\label{wxfilenameappenddir}
189
190\func{void}{AppendDir}{\param{const wxString\& }{dir}}
191
192
193\membersection{wxFileName::Assign}\label{wxfilenameassign}
194
195\func{void}{Assign}{\param{const wxFileName\& }{filepath}}
196
2569938d
VZ
197\func{void}{Assign}{\param{const wxString\& }{fullpath}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
198
2569938d
VZ
199\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
2569938d
VZ
201\func{void}{Assign}{\param{const wxString\& }{path}, \param{const wxString\& }{name}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
202
2569938d
VZ
203\func{void}{Assign}{\param{const wxString\& }{path}, \param{const wxString\& }{name}, \param{const wxString\& }{ext}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
204
205
206\membersection{wxFileName::AssignCwd}\label{wxfilenameassigncwd}
207
6f91bc33
VZ
208\func{void}{AssignCwd}{\param{const wxString\& }{volume = ""}}
209
210Makes this object refer to the current working directory on the specified
211volume (or current volume if {\it volume} is empty).
2569938d 212
6f91bc33 213\wxheading{See also}
2569938d 214
6f91bc33 215\helpref{GetCwd}{wxfilenamegetcwd}
2569938d
VZ
216
217\membersection{wxFileName::AssignDir}\label{wxfilenameassigndir}
218
219\func{void}{AssignDir}{\param{const wxString\& }{dir}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
220
81f25632
VZ
221Set this file name object to the given directory name. The name and extension
222will be empty.
2569938d
VZ
223
224\membersection{wxFileName::AssignHomeDir}\label{wxfilenameassignhomedir}
225
226\func{void}{AssignHomeDir}{\void}
227
81f25632 228Set this file name object to the home directory.
2569938d
VZ
229
230\membersection{wxFileName::AssignTempFileName}\label{wxfilenameassigntempfilename}
231
df22f860 232\func{void}{AssignTempFileName}{\param{const wxString\& }{prefix}, \param{wxFile *}{fileTemp = {\tt NULL}}}
2569938d 233
ade35f11
VZ
234The function calls \helpref{CreateTempFileName}{wxfilenamecreatetempfilename} to
235create a temporary file and sets this object to the name of the file. If a
236temporary file couldn't be created, the object is put into the\rtfsp
237\helpref{invalid}{wxfilenameisok} state.
2569938d
VZ
238
239\membersection{wxFileName::Clear}\label{wxfilenameclear}
240
241\func{void}{Clear}{\void}
242
ade35f11
VZ
243Reset all components to default, uninitialized state.
244
02a3b391 245\membersection{wxFileName::CreateTempFileName}\label{wxfilenamecreatetempfilename}
ade35f11 246
df22f860 247\func{static wxString}{CreateTempFileName}{\param{const wxString\& }{prefix}, \param{wxFile *}{fileTemp = {\tt NULL}}}
ade35f11
VZ
248
249Returns a temporary file name starting with the given {\it prefix}. If
250the {\it prefix} is an absolute path, the temporary file is created in this
251directory, otherwise it is created in the default system directory for the
252temporary files or in the current directory.
2569938d 253
df22f860
VZ
254If the function succeeds, the temporary file is actually created. If\rtfsp
255{\it fileTemp} is not {\tt NULL}, this file will be opened using the name of
256the temporary file. When possible, this is done in an atomic way ensuring that
257no race condition occurs between the temporary file name generation and opening
258it which could often lead to security compromise on the multiuser systems.
259If {\it fileTemp} is {\tt NULL}, the file is only created, but not opened.
260
261Under Unix, the temporary file will have read and write permissions for the
262owner only to minimize the security problems.
263
264\wxheading{Parameters}
265
266\docparam{prefix}{Prefix to use for the temporary file name construction}
267
268\docparam{fileTemp}{The file to open or {\tt NULL} to just get the name}
ade35f11
VZ
269
270\wxheading{Return value}
271
272The full temporary file name or an empty string on error.
2569938d
VZ
273
274\membersection{wxFileName::DirExists}\label{wxfilenamedirexists}
275
276\func{bool}{DirExists}{\void}
277
2569938d
VZ
278\func{bool}{DirExists}{\param{const wxString\& }{dir}}
279
02a3b391 280Does the directory with this name exists?
2569938d
VZ
281
282\membersection{wxFileName::DirName}\label{wxfilenamedirname}
283
284\func{wxFileName}{DirName}{\param{const wxString\& }{dir}}
285
2569938d
VZ
286\membersection{wxFileName::FileExists}\label{wxfilenamefileexists}
287
288\func{bool}{FileExists}{\void}
289
2569938d
VZ
290\func{bool}{FileExists}{\param{const wxString\& }{file}}
291
02a3b391 292Does the file with this name exists?
2569938d
VZ
293
294\membersection{wxFileName::FileName}\label{wxfilenamefilename}
295
296\func{wxFileName}{FileName}{\param{const wxString\& }{file}}
297
298static pseudo constructors
299
2569938d
VZ
300\membersection{wxFileName::GetCwd}\label{wxfilenamegetcwd}
301
6f91bc33
VZ
302\func{wxString}{GetCwd}{\param{const wxString\& }{volume = ""}}
303
304Retrieve the value of the current working directory on the specified volume. If
305the volume is empty, the programs current working directory is returned for the
306current volume.
307
308\wxheading{Return value}
309
310The string containing the current working directory or an empty string on
311error.
2569938d 312
6f91bc33
VZ
313\wxheading{See also}
314
315\helpref{AssignCwd}{wxfilenameassigncwd}
2569938d
VZ
316
317\membersection{wxFileName::GetDirCount}\label{wxfilenamegetdircount}
318
319\constfunc{size\_t}{GetDirCount}{\void}
320
321
322\membersection{wxFileName::GetDirs}\label{wxfilenamegetdirs}
323
324\constfunc{const wxArrayString\&}{GetDirs}{\void}
325
326
327\membersection{wxFileName::GetExt}\label{wxfilenamegetext}
328
329\constfunc{wxString}{GetExt}{\void}
330
331
332\membersection{wxFileName::GetFormat}\label{wxfilenamegetformat}
333
334\func{wxPathFormat}{GetFormat}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
335
336various helpers
337get the canonical path format for this platform
338
339
340\membersection{wxFileName::GetFullName}\label{wxfilenamegetfullname}
341
342\constfunc{wxString}{GetFullName}{\void}
343
344
345\membersection{wxFileName::GetFullPath}\label{wxfilenamegetfullpath}
346
347\constfunc{wxString}{GetFullPath}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
348
349add separator Construct full path with name and ext
350
351
352\membersection{wxFileName::GetHomeDir}\label{wxfilenamegethomedir}
353
354\func{wxString}{GetHomeDir}{\void}
355
356
357\membersection{wxFileName::GetLongPath}\label{wxfilenamegetlongpath}
358
359\constfunc{wxString}{GetLongPath}{\void}
360
361Return the long form of the path (returns identity on non-Windows platforms)
362
363
364\membersection{wxFileName::GetModificationTime}\label{wxfilenamegetmodificationtime}
365
366\constfunc{wxDateTime}{GetModificationTime}{\void}
367
368convenience wrapper: get just the last mod time of the file
369
370
371\membersection{wxFileName::GetName}\label{wxfilenamegetname}
372
373\constfunc{wxString}{GetName}{\void}
374
375
376\membersection{wxFileName::GetPath}\label{wxfilenamegetpath}
377
378\constfunc{wxString}{GetPath}{\param{bool }{add\_separator = FALSE}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
379
380Construct path only - possibly with the trailing separator
381
382
383\membersection{wxFileName::GetPathSeparators}\label{wxfilenamegetpathseparators}
384
385\func{wxString}{GetPathSeparators}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
386
387get the string of path separators for this format
388
389
390\membersection{wxFileName::GetPathWithSep}\label{wxfilenamegetpathwithsep}
391
392\constfunc{wxString}{GetPathWithSep}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
393
394more readable synonym
395
396
397\membersection{wxFileName::GetShortPath}\label{wxfilenamegetshortpath}
398
399\constfunc{wxString}{GetShortPath}{\void}
400
401Return the short form of the path (returns identity on non-Windows platforms)
402
403
404\membersection{wxFileName::GetTimes}\label{wxfilenamegettimes}
405
6dbb903b 406\constfunc{bool}{GetTimes}{\param{wxDateTime* }{dtAccess}, \param{wxDateTime* }{dtMod}, \param{wxDateTime* }{dtCreate}}
2569938d 407
6dbb903b 408return the last access, last modification and creation times
2569938d
VZ
409(any of the pointers may be NULL)
410
411
412\membersection{wxFileName::GetVolume}\label{wxfilenamegetvolume}
413
414\constfunc{wxString}{GetVolume}{\void}
415
416
417\membersection{wxFileName::GetVolumeSeparator}\label{wxfilenamegetvolumeseparator}
418
419\func{wxString}{GetVolumeSeparator}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
420
421get the string separating the volume from the path for this format
422
423
424\membersection{wxFileName::HasExt}\label{wxfilenamehasext}
425
426\constfunc{bool}{HasExt}{\void}
427
428
429\membersection{wxFileName::HasName}\label{wxfilenamehasname}
430
431\constfunc{bool}{HasName}{\void}
432
433
434\membersection{wxFileName::HasVolume}\label{wxfilenamehasvolume}
435
436\constfunc{bool}{HasVolume}{\void}
437
438
439\membersection{wxFileName::InsertDir}\label{wxfilenameinsertdir}
440
441\func{void}{InsertDir}{\param{int }{before}, \param{const wxString\& }{dir}}
442
443
444\membersection{wxFileName::IsAbsolute}\label{wxfilenameisabsolute}
445
446\func{bool}{IsAbsolute}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
447
448is this filename absolute?
449
450
451\membersection{wxFileName::IsCaseSensitive}\label{wxfilenameiscasesensitive}
452
453\func{bool}{IsCaseSensitive}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
454
455Tests
456are the file names of this type cases sensitive?
457
458
459\membersection{wxFileName::IsOk}\label{wxfilenameisok}
460
461\constfunc{bool}{IsOk}{\void}
462
ade35f11
VZ
463Returns {\tt TRUE} if the filename is valid, {\tt FALSE} if it is not
464initialized yet. The assignment functions and
465\helpref{Clear}{wxfilenameclear} may reset the object to the uninitialized,
466invalid state (the former only do it on failure).
2569938d
VZ
467
468\membersection{wxFileName::IsPathSeparator}\label{wxfilenameispathseparator}
469
470\func{bool}{IsPathSeparator}{\param{wxChar }{ch}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
471
f7d886af 472Returns {\tt TRUE} if the char is a path separator for this format.
2569938d
VZ
473
474\membersection{wxFileName::IsRelative}\label{wxfilenameisrelative}
475
476\func{bool}{IsRelative}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
477
f7d886af 478Returns {\tt TRUE} if this filename is not absolute.
2569938d
VZ
479
480\membersection{wxFileName::IsWild}\label{wxfilenameiswild}
481
482\func{bool}{IsWild}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
483
484FIXME: what exactly does this do?
485
f7d886af
VZ
486\membersection{wxFileName::MakeRelativeTo}\label{wxfilenamemakerelativeto}
487
488\func{bool}{MakeRelativeTo}{\param{const wxString\& }{pathBase = ""}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
489
490This function tries to put this file name in a form relative to {\it pathBase}.
491In other words, it returns the file name which should be used to access this
492file if the current directory were {\it pathBase}.
493
494\docparam{pathBase}{the directory to use as root, current directory is used by
495default}
496
497\docparam{format}{the file name format, native by default}
498
499\wxheading{Return value}
500
501{\tt TRUE} if the file name has been changed, {\tt FALSE} if we failed to do
502anything with it (currently this only happens if the file name is on a volume
503different from the volume specified by {\it pathBase}).
504
505\wxheading{See also}
506
507\helpref{Normalize}{wxfilenamenormalize}
2569938d
VZ
508
509\membersection{wxFileName::Mkdir}\label{wxfilenamemkdir}
510
511\func{bool}{Mkdir}{\param{int }{perm = 0777}, \param{bool }{full = FALSE}}
512
6f91bc33 513\func{static bool}{Mkdir}{\param{const wxString\& }{dir}, \param{int }{perm = 0777}, \param{bool }{full = FALSE}}
2569938d 514
6f91bc33 515\docparam{dir}{the directory to create}
2569938d 516
6f91bc33
VZ
517\docparam{parm}{the permissions for the newly created directory}
518
519\docparam{full}{if {\tt TRUE}, will try to make each directory in the path}
2569938d 520
6f91bc33 521\wxheading{Return value}
2569938d 522
6f91bc33
VZ
523Returns {\tt TRUE} if the directory was successfully created, {\tt FALSE}
524otherwise.
2569938d
VZ
525
526\membersection{wxFileName::Normalize}\label{wxfilenamenormalize}
527
32a0d013 528\func{bool}{Normalize}{\param{int }{flags = wxPATH\_NORM\_ALL}, \param{const wxString\& }{cwd = wxEmptyString}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
2569938d
VZ
529
530operations on the path
531normalize the path: with the default flags value, the path will be
532made absolute, without any ".." and "." and all environment
533variables will be expanded in it
534this may be done using another (than current) value of cwd
535
536
537\membersection{wxFileName::PrependDir}\label{wxfilenameprependdir}
538
539\func{void}{PrependDir}{\param{const wxString\& }{dir}}
540
541
542\membersection{wxFileName::RemoveDir}\label{wxfilenameremovedir}
543
544\func{void}{RemoveDir}{\param{int }{pos}}
545
546
547\membersection{wxFileName::Rmdir}\label{wxfilenamermdir}
548
549\func{bool}{Rmdir}{\void}
550
6f91bc33 551\func{static bool}{Rmdir}{\param{const wxString\& }{dir}}
2569938d 552
6f91bc33 553Deletes the specified directory.
2569938d
VZ
554
555
556\membersection{wxFileName::SameAs}\label{wxfilenamesameas}
557
558\func{bool}{SameAs}{\param{const wxFileName\& }{filepath}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
559
6f91bc33 560Compares the filename using the rules of this platform
2569938d
VZ
561
562
563\membersection{wxFileName::SetCwd}\label{wxfilenamesetcwd}
564
565\func{bool}{SetCwd}{\void}
566
6f91bc33 567\func{static bool}{SetCwd}{\param{const wxString\& }{cwd}}
2569938d 568
6f91bc33 569change the current working directory
2569938d
VZ
570
571\membersection{wxFileName::SetExt}\label{wxfilenamesetext}
572
573\func{void}{SetExt}{\param{const wxString\& }{ext}}
574
575
576\membersection{wxFileName::SetFullName}\label{wxfilenamesetfullname}
577
578\func{void}{SetFullName}{\param{const wxString\& }{fullname}}
579
580full name is the file name + extension (but without the path)
581
582
583\membersection{wxFileName::SetName}\label{wxfilenamesetname}
584
585\func{void}{SetName}{\param{const wxString\& }{name}}
586
587
588\membersection{wxFileName::SetTimes}\label{wxfilenamesettimes}
589
6dbb903b 590\func{bool}{SetTimes}{\param{const wxDateTime* }{dtAccess}, \param{const wxDateTime* }{dtMod}, \param{const wxDateTime* }{dtCreate}}
2569938d
VZ
591
592set the file creation and last access/mod times
593(any of the pointers may be NULL)
594
595
596\membersection{wxFileName::SetVolume}\label{wxfilenamesetvolume}
597
598\func{void}{SetVolume}{\param{const wxString\& }{volume}}
599
600
601\membersection{wxFileName::SplitPath}\label{wxfilenamesplitpath}
602
603\func{void}{SplitPath}{\param{const wxString\& }{fullpath}, \param{wxString* }{volume}, \param{wxString* }{path}, \param{wxString* }{name}, \param{wxString* }{ext}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
604
605\func{void}{SplitPath}{\param{const wxString\& }{fullpath}, \param{wxString* }{path}, \param{wxString* }{name}, \param{wxString* }{ext}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
606
607split a fullpath into the volume, path, (base) name and extension
608(all of the pointers can be NULL)
609
610\membersection{wxFileName::Touch}\label{wxfilenametouch}
611
612\func{bool}{Touch}{\void}
613
614set the access and modification times to the current moment
615
616
617\membersection{wxFileName::operator=}\label{wxfilenameoperatorassign}
618
619\func{wxFileName\& operator}{operator=}{\param{const wxFileName\& }{filename}}
620
2569938d
VZ
621\func{wxFileName\& operator}{operator=}{\param{const wxString\& }{filename}}
622
6f91bc33 623Assigns the new value to this filename object.
2569938d
VZ
624
625\membersection{wxFileName::operator==}\label{wxfilenameoperatorequal}
626
627\func{bool operator}{operator==}{\param{const wxFileName\& }{filename}}
628
2569938d
VZ
629\func{bool operator}{operator==}{\param{const wxString\& }{filename}}
630
6f91bc33
VZ
631Returns {\tt TRUE} if the filenames are equal for the native file format.
632