]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/filename.tex
cleanup (mainly wrapping lines to be < 80 chars); added IsExpanded()
[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
8795498c 9%% License: wxWindows license
2569938d
VZ
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
fc2171bd 17functions (and \helpref{wxWidgets functions}{filefunctions} wrapping them).
2569938d 18Second, it includes the functions for working with the files itself. Note that
95c00185 19to change the file data you should use \helpref{wxFile}{wxfile} class instead.
2569938d
VZ
20wxFileName provides functions for working with the file attributes.
21
22\wxheading{Derived from}
23
24No base class
25
93ab511d
VZ
26\wxheading{Include files}
27
28<wx/filename.h>
29
2569938d
VZ
30\wxheading{Data structures}
31
32Many wxFileName methods accept the path format argument which is by\rtfsp
33{\tt wxPATH\_NATIVE} by default meaning to use the path format native for the
34current platform.
35
36The path format affects the operation of wxFileName functions in several ways:
37first and foremost, it defines the path separator character to use, but it also
38affects other things such as whether the path has the drive part or not.
39
40\begin{verbatim}
41enum wxPathFormat
42{
43 wxPATH_NATIVE = 0, // the path format for the current platform
44 wxPATH_UNIX,
f363e05c 45 wxPATH_BEOS = wxPATH_UNIX,
2569938d
VZ
46 wxPATH_MAC,
47 wxPATH_DOS,
f363e05c
VZ
48 wxPATH_WIN = wxPATH_DOS,
49 wxPATH_OS2 = wxPATH_DOS,
2569938d
VZ
50 wxPATH_VMS,
51
f363e05c 52 wxPATH_MAX // Not a valid value for specifying path format
2569938d
VZ
53}
54\end{verbatim}
55
6f91bc33
VZ
56\latexignore{\rtfignore{\wxheading{Function groups}}}
57
5bb9aeb2 58
f0e8a2d0 59\membersection{File name format}\label{filenameformat}
6f91bc33
VZ
60
61wxFileName currently supports the file names in the Unix, DOS/Windows, Mac OS
62and VMS formats. Although these formats are quite different, wxFileName tries
2edb0bde 63to treat them all in the same generic way. It supposes that all file names
6f91bc33
VZ
64consist of the following parts: the volume (also known as drive under Windows
65or device under VMS), the path which is a sequence of directory names separated
66by the \helpref{path separators}{wxfilenamegetpathseparators} and the full
67filename itself which, in turn, is composed from the base file name and the
68extension. All of the individual components of the file name may be empty and,
69for example, the volume name is always empty under Unix, but if they are all
70empty simultaneously, the filename object is considered to be in an invalid
0894707e 71state and \helpref{IsOk}{wxfilenameisok} returns {\tt false} for it.
6f91bc33
VZ
72
73File names can be case-sensitive or not, the function\rtfsp
74\helpref{IsCaseSensitive}{wxfilenameiscasesensitive} allows to determine this.
75
47ce5c4a
VZ
76The rules for determining whether the file name is absolute or relative also
77depend on the file name format and the only portable way to answer this
78question is to use \helpref{IsAbsolute}{wxfilenameisabsolute} or\rtfsp
79\helpref{IsRelative}{wxfilenameisrelative} method. Note that on Windows, "X:"
80refers to the current working directory on drive X. Therefore, a wxFileName
81instance constructed from for example "X:dir/file.ext" treats the portion
82beyond drive separator as being relative to that directory.
83
84To ensure that the filename is absolute, you may use\rtfsp
85\helpref{MakeAbsolute}{wxfilenamemakeabsolute}. There is also an inverse
86function \helpref{MakeRelativeTo}{wxfilenamemakerelativeto} which undoes
87what \helpref{Normalize(wxPATH\_NORM\_DOTS)}{wxfilenamenormalize} does.
6f91bc33
VZ
88
89Other functions returning information about the file format provided by this
90class are \helpref{GetVolumeSeparator}{wxfilenamegetvolumeseparator},\rtfsp
2db991f4 91\helpref{IsPathSeparator}{wxfilenameispathseparator}.
6f91bc33 92
5bb9aeb2 93
f0e8a2d0 94\membersection{File name construction}\label{filenameconstruction}
6f91bc33 95
3ff07edb
RR
96You can initialize a wxFileName instance using one of the following functions:
97
98\helpref{wxFileName constructors}{wxfilenamewxfilename}\\
99\helpref{Assign}{wxfilenameassign}\\
100\helpref{AssignCwd}{wxfilenameassigncwd}\\
101\helpref{AssignDir}{wxfilenameassigndir}\\
102\helpref{AssignHomeDir}{wxfilenameassignhomedir}\\
103\helpref{AssignHomeTempFileName}{wxfilenameassigntempfilename}\\
104\helpref{operator $=$}{wxfilenameoperatorassign}
6f91bc33 105
5bb9aeb2 106
f0e8a2d0 107\membersection{File tests}\label{filetests}
6f91bc33 108
47ce5c4a
VZ
109Before doing other tests, you should use \helpref{IsOk}{wxfilenameisok} to
110verify that the filename is well defined. If it is,\rtfsp
111\helpref{FileExists}{wxfilenamefileexists} can be used to test whether a file
112with such name exists and \helpref{DirExists}{wxfilenamedirexists} can be used
113to test for directory existence.
6f91bc33
VZ
114
115File names should be compared using \helpref{SameAs}{wxfilenamesameas} method
3ff07edb
RR
116or \helpref{operator $==$}{wxfilenameoperatorequal}.
117
118For testing basic access modes, you can use:
119
120\helpref{IsDirWritable}{wxfilenameisdirwritable}\\
121\helpref{IsDirReadable}{wxfilenameisdirreadable}\\
122\helpref{IsFileWritable}{wxfilenameisfilewritable}\\
123\helpref{IsFileReadable}{wxfilenameisfilereadable}\\
124\helpref{IsFileExecutable}{wxfilenameisfileexecutable}
6f91bc33 125
5bb9aeb2 126
f0e8a2d0 127\membersection{File name components}\label{filenamecomponents}
6f91bc33 128
2458d90b
VZ
129These functions allow to examine and modify the individual directories of the
130path:
6f91bc33
VZ
131
132\helpref{AppendDir}{wxfilenameappenddir}\\
133\helpref{InsertDir}{wxfilenameinsertdir}\\
134\helpref{GetDirCount}{wxfilenamegetdircount}
135\helpref{PrependDir}{wxfilenameprependdir}\\
2458d90b
VZ
136\helpref{RemoveDir}{wxfilenameremovedir}\\
137\helpref{RemoveLastDir}{wxfilenameremovelastdir}
6f91bc33
VZ
138
139To change the components of the file name individually you can use the
140following functions:
141
142\helpref{GetExt}{wxfilenamegetext}\\
143\helpref{GetName}{wxfilenamegetname}\\
144\helpref{GetVolume}{wxfilenamegetvolume}\\
145\helpref{HasExt}{wxfilenamehasext}\\
146\helpref{HasName}{wxfilenamehasname}\\
147\helpref{HasVolume}{wxfilenamehasvolume}\\
148\helpref{SetExt}{wxfilenamesetext}\\
0b40f3d8
RR
149\helpref{ClearExt}{wxfilenameclearext}\\
150\helpref{SetEmptyExt}{wxfilenamesetemptyext}\\
6f91bc33
VZ
151\helpref{SetName}{wxfilenamesetname}\\
152\helpref{SetVolume}{wxfilenamesetvolume}\\
153
5bb9aeb2 154
f0e8a2d0 155\membersection{Operations}\label{filenameoperations}
6f91bc33
VZ
156
157These methods allow to work with the file creation, access and modification
6dbb903b
VZ
158times. Note that not all filesystems under all platforms implement these times
159in the same way. For example, the access time under Windows has a resolution of
160one day (so it is really the access date and not time). The access time may be
161updated when the file is executed or not depending on the platform.
6f91bc33
VZ
162
163\helpref{GetModificationTime}{wxfilenamegetmodificationtime}\\
164\helpref{GetTimes}{wxfilenamegettimes}\\
165\helpref{SetTimes}{wxfilenamesettimes}\\
166\helpref{Touch}{wxfilenametouch}
167
168Other file system operations functions are:
169
170\helpref{Mkdir}{wxfilenamemkdir}\\
171\helpref{Rmdir}{wxfilenamermdir}
172
2569938d
VZ
173\latexignore{\rtfignore{\wxheading{Members}}}
174
5bb9aeb2 175
6f91bc33 176\membersection{wxFileName::wxFileName}\label{wxfilenamewxfilename}
2569938d
VZ
177
178\func{}{wxFileName}{\void}
179
180Default constructor.
181
2569938d
VZ
182\func{}{wxFileName}{\param{const wxFileName\& }{filename}}
183
184Copy constructor.
185
2569938d
VZ
186\func{}{wxFileName}{\param{const wxString\& }{fullpath}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
187
95c00185 188Constructor taking a full filename. If it terminates with a '/', a directory path
2edb0bde 189is constructed (the name will be empty), otherwise a file name and
95c00185 190extension are extracted from it.
2569938d 191
2569938d
VZ
192\func{}{wxFileName}{\param{const wxString\& }{path}, \param{const wxString\& }{name}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
193
6f91bc33 194Constructor from a directory name and a file name.
2569938d
VZ
195
196\func{}{wxFileName}{\param{const wxString\& }{path}, \param{const wxString\& }{name}, \param{const wxString\& }{ext}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
197
95c00185 198Constructor from a directory name, base file name and extension.
81f25632
VZ
199
200\func{}{wxFileName}{\param{const wxString\& }{volume}, \param{const wxString\& }{path}, \param{const wxString\& }{name}, \param{const wxString\& }{ext}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
201
95c00185 202Constructor from a volume name, a directory name, base file name and extension.
2569938d 203
5bb9aeb2 204
2569938d
VZ
205\membersection{wxFileName::AppendDir}\label{wxfilenameappenddir}
206
207\func{void}{AppendDir}{\param{const wxString\& }{dir}}
208
5bb9aeb2
VZ
209Appends a directory component to the path. This component should contain a
210single directory name level, i.e. not contain any path or volume separators nor
211should it be empty, otherwise the function does nothing (and generates an
212assert failure in debug build).
213
2569938d
VZ
214
215\membersection{wxFileName::Assign}\label{wxfilenameassign}
216
217\func{void}{Assign}{\param{const wxFileName\& }{filepath}}
218
2569938d
VZ
219\func{void}{Assign}{\param{const wxString\& }{fullpath}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
220
dfecbee5
VZ
221\func{void}{Assign}{\param{const wxString\& }{volume}, \param{const wxString\& }{path}, \param{const wxString\& }{name}, \param{const wxString\& }{ext}, \param{bool }{hasExt}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
222
2569938d
VZ
223\func{void}{Assign}{\param{const wxString\& }{volume}, \param{const wxString\& }{path}, \param{const wxString\& }{name}, \param{const wxString\& }{ext}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
224
2569938d
VZ
225\func{void}{Assign}{\param{const wxString\& }{path}, \param{const wxString\& }{name}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
226
2569938d
VZ
227\func{void}{Assign}{\param{const wxString\& }{path}, \param{const wxString\& }{name}, \param{const wxString\& }{ext}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
228
95c00185 229Creates the file name from various combinations of data.
2569938d 230
5bb9aeb2 231
2569938d
VZ
232\membersection{wxFileName::AssignCwd}\label{wxfilenameassigncwd}
233
f363e05c 234\func{static void}{AssignCwd}{\param{const wxString\& }{volume = wxEmptyString}}
6f91bc33
VZ
235
236Makes this object refer to the current working directory on the specified
237volume (or current volume if {\it volume} is empty).
2569938d 238
6f91bc33 239\wxheading{See also}
2569938d 240
6f91bc33 241\helpref{GetCwd}{wxfilenamegetcwd}
2569938d 242
5bb9aeb2 243
2569938d
VZ
244\membersection{wxFileName::AssignDir}\label{wxfilenameassigndir}
245
246\func{void}{AssignDir}{\param{const wxString\& }{dir}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
247
95c00185 248Sets this file name object to the given directory name. The name and extension
81f25632 249will be empty.
2569938d 250
5bb9aeb2 251
2569938d
VZ
252\membersection{wxFileName::AssignHomeDir}\label{wxfilenameassignhomedir}
253
254\func{void}{AssignHomeDir}{\void}
255
95c00185 256Sets this file name object to the home directory.
2569938d 257
5bb9aeb2 258
2569938d
VZ
259\membersection{wxFileName::AssignTempFileName}\label{wxfilenameassigntempfilename}
260
df22f860 261\func{void}{AssignTempFileName}{\param{const wxString\& }{prefix}, \param{wxFile *}{fileTemp = {\tt NULL}}}
2569938d 262
ade35f11
VZ
263The function calls \helpref{CreateTempFileName}{wxfilenamecreatetempfilename} to
264create a temporary file and sets this object to the name of the file. If a
265temporary file couldn't be created, the object is put into the\rtfsp
266\helpref{invalid}{wxfilenameisok} state.
2569938d 267
5bb9aeb2 268
2569938d
VZ
269\membersection{wxFileName::Clear}\label{wxfilenameclear}
270
271\func{void}{Clear}{\void}
272
ade35f11
VZ
273Reset all components to default, uninitialized state.
274
5bb9aeb2 275
0b40f3d8
RR
276\membersection{wxFileName::ClearExt}\label{wxfilenameclearext}
277
278\func{void}{SetClearExt}{\void}
279
280Removes the extension from the file name resulting in a
281file name with no trailing dot.
282
283\wxheading{See also}
284
285\helpref{SetExt}{wxfilenamesetext}
286\helpref{SetEmptyExt}{wxfilenamesetemptyext}
287
02a3b391 288\membersection{wxFileName::CreateTempFileName}\label{wxfilenamecreatetempfilename}
ade35f11 289
df22f860 290\func{static wxString}{CreateTempFileName}{\param{const wxString\& }{prefix}, \param{wxFile *}{fileTemp = {\tt NULL}}}
ade35f11
VZ
291
292Returns a temporary file name starting with the given {\it prefix}. If
293the {\it prefix} is an absolute path, the temporary file is created in this
294directory, otherwise it is created in the default system directory for the
295temporary files or in the current directory.
2569938d 296
df22f860
VZ
297If the function succeeds, the temporary file is actually created. If\rtfsp
298{\it fileTemp} is not {\tt NULL}, this file will be opened using the name of
299the temporary file. When possible, this is done in an atomic way ensuring that
300no race condition occurs between the temporary file name generation and opening
301it which could often lead to security compromise on the multiuser systems.
302If {\it fileTemp} is {\tt NULL}, the file is only created, but not opened.
303
304Under Unix, the temporary file will have read and write permissions for the
305owner only to minimize the security problems.
306
307\wxheading{Parameters}
308
309\docparam{prefix}{Prefix to use for the temporary file name construction}
310
311\docparam{fileTemp}{The file to open or {\tt NULL} to just get the name}
ade35f11
VZ
312
313\wxheading{Return value}
314
315The full temporary file name or an empty string on error.
2569938d 316
5bb9aeb2 317
2569938d
VZ
318\membersection{wxFileName::DirExists}\label{wxfilenamedirexists}
319
8e41796c 320\constfunc{bool}{DirExists}{\void}
2569938d 321
8e41796c 322\func{static bool}{DirExists}{\param{const wxString\& }{dir}}
2569938d 323
f363e05c 324Returns {\tt true} if the directory with this name exists.
2569938d 325
5bb9aeb2 326
2569938d
VZ
327\membersection{wxFileName::DirName}\label{wxfilenamedirname}
328
520200fd
VZ
329\func{static wxFileName}{DirName}{\param{const wxString\& }{dir}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
330
331Returns the object corresponding to the directory with the given name.
332The {\it dir} parameter may have trailing path separator or not.
2569938d 333
95c00185 334
5bb9aeb2 335
2569938d
VZ
336\membersection{wxFileName::FileExists}\label{wxfilenamefileexists}
337
8e41796c 338\constfunc{bool}{FileExists}{\void}
2569938d 339
8e41796c 340\func{static bool}{FileExists}{\param{const wxString\& }{file}}
2569938d 341
f363e05c 342Returns {\tt true} if the file with this name exists.
2569938d 343
8e41796c
VZ
344\wxheading{See also}
345
346\helpref{DirExists}{wxfilenamedirexists}
347
520200fd 348
5bb9aeb2 349
2569938d
VZ
350\membersection{wxFileName::FileName}\label{wxfilenamefilename}
351
520200fd
VZ
352\func{static wxFileName}{FileName}{\param{const wxString\& }{file}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
353
354Returns the file name object corresponding to the given {\it file}. This
355function exists mainly for symmetry with \helpref{DirName}{wxfilenamedirname}.
2569938d 356
2569938d 357
5bb9aeb2 358
2569938d
VZ
359\membersection{wxFileName::GetCwd}\label{wxfilenamegetcwd}
360
f363e05c 361\func{static wxString}{GetCwd}{\param{const wxString\& }{volume = ""}}
6f91bc33 362
95c00185 363Retrieves the value of the current working directory on the specified volume. If
43e8916f 364the volume is empty, the program's current working directory is returned for the
6f91bc33
VZ
365current volume.
366
367\wxheading{Return value}
368
369The string containing the current working directory or an empty string on
370error.
2569938d 371
6f91bc33
VZ
372\wxheading{See also}
373
374\helpref{AssignCwd}{wxfilenameassigncwd}
2569938d 375
5bb9aeb2 376
2569938d
VZ
377\membersection{wxFileName::GetDirCount}\label{wxfilenamegetdircount}
378
379\constfunc{size\_t}{GetDirCount}{\void}
380
95c00185 381Returns the number of directories in the file name.
2569938d 382
5bb9aeb2 383
2569938d
VZ
384\membersection{wxFileName::GetDirs}\label{wxfilenamegetdirs}
385
386\constfunc{const wxArrayString\&}{GetDirs}{\void}
387
95c00185 388Returns the directories in string array form.
2569938d 389
5bb9aeb2 390
2569938d
VZ
391\membersection{wxFileName::GetExt}\label{wxfilenamegetext}
392
393\constfunc{wxString}{GetExt}{\void}
394
95c00185 395Returns the file name extension.
2569938d 396
5bb9aeb2 397
f363e05c
VZ
398\membersection{wxFileName::GetForbiddenChars}\label{wxfilenamegetforbiddenchars}
399
400\func{static wxString}{GetForbiddenChars}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
401
402Returns the characters that can't be used in filenames and directory names for the specified format.
403
5bb9aeb2 404
2569938d
VZ
405\membersection{wxFileName::GetFormat}\label{wxfilenamegetformat}
406
f363e05c 407\func{static wxPathFormat}{GetFormat}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
2569938d 408
95c00185 409Returns the canonical path format for this platform.
2569938d 410
5bb9aeb2 411
2569938d
VZ
412\membersection{wxFileName::GetFullName}\label{wxfilenamegetfullname}
413
414\constfunc{wxString}{GetFullName}{\void}
415
95c00185 416Returns the full name (including extension but excluding directories).
2569938d 417
5bb9aeb2 418
2569938d
VZ
419\membersection{wxFileName::GetFullPath}\label{wxfilenamegetfullpath}
420
421\constfunc{wxString}{GetFullPath}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
422
95c00185 423Returns the full path with name and extension.
2569938d 424
5bb9aeb2 425
2569938d
VZ
426\membersection{wxFileName::GetHomeDir}\label{wxfilenamegethomedir}
427
f363e05c 428\func{static wxString}{GetHomeDir}{\void}
2569938d 429
95c00185 430Returns the home directory.
2569938d 431
5bb9aeb2 432
2569938d
VZ
433\membersection{wxFileName::GetLongPath}\label{wxfilenamegetlongpath}
434
435\constfunc{wxString}{GetLongPath}{\void}
436
437Return the long form of the path (returns identity on non-Windows platforms)
438
5bb9aeb2 439
2569938d
VZ
440\membersection{wxFileName::GetModificationTime}\label{wxfilenamegetmodificationtime}
441
442\constfunc{wxDateTime}{GetModificationTime}{\void}
443
95c00185 444Returns the last time the file was last modified.
2569938d 445
5bb9aeb2 446
2569938d
VZ
447\membersection{wxFileName::GetName}\label{wxfilenamegetname}
448
449\constfunc{wxString}{GetName}{\void}
450
4e43c815
VZ
451Returns the name part of the filename (without extension).
452
453\wxheading{See also}
454
455\helpref{GetFullName}{wxfilenamegetfullname}
456
2569938d 457
5bb9aeb2 458
2569938d
VZ
459\membersection{wxFileName::GetPath}\label{wxfilenamegetpath}
460
93fa67c0 461\constfunc{wxString}{GetPath}{\param{int }{flags = {\tt wxPATH\_GET\_VOLUME}}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
2569938d 462
95c00185 463Returns the path part of the filename (without the name or extension). The
33b97389 464possible flags values are:
2569938d 465
d1853d47 466\twocolwidtha{5cm}
33b97389 467\begin{twocollist}\itemsep=0pt
d1853d47 468\twocolitem{{\bf wxPATH\_GET\_VOLUME}}{Return the path with the volume (does
93fa67c0
VZ
469nothing for the filename formats without volumes), otherwise the path without
470volume part is returned.}
d1853d47 471\twocolitem{{\bf wxPATH\_GET\_SEPARATOR}}{Return the path with the trailing
33b97389
VZ
472separator, if this flag is not given there will be no separator at the end of
473the path.}
474\end{twocollist}
475
5bb9aeb2 476
33b97389
VZ
477\membersection{wxFileName::GetPathSeparator}\label{wxfilenamegetpathseparator}
478
f363e05c 479\func{static wxChar}{GetPathSeparator}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
33b97389 480
95c00185 481Returns the usually used path separator for this format. For all formats but
33b97389
VZ
482{\tt wxPATH\_DOS} there is only one path separator anyhow, but for DOS there
483are two of them and the native one, i.e. the backslash is returned by this
484method.
485
486\wxheading{See also}
487
488\helpref{GetPathSeparators}{wxfilenamegetpathseparators}
2569938d 489
5bb9aeb2 490
2569938d
VZ
491\membersection{wxFileName::GetPathSeparators}\label{wxfilenamegetpathseparators}
492
f363e05c 493\func{static wxString}{GetPathSeparators}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
2569938d 494
95c00185 495Returns the string containing all the path separators for this format. For all
33b97389 496formats but {\tt wxPATH\_DOS} this string contains only one character but for
7af3ca16 497DOS and Windows both {\tt '/'} and {\tt '\textbackslash'} may be used as
33b97389
VZ
498separators.
499
500\wxheading{See also}
2569938d 501
33b97389 502\helpref{GetPathSeparator}{wxfilenamegetpathseparator}
2569938d 503
5bb9aeb2 504
f1e77933
VZ
505\membersection{wxFileName::GetPathTerminators}\label{wxfilenamegetpathterminators}
506
507\func{static wxString}{GetPathTerminators}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
508
509Returns the string of characters which may terminate the path part. This is the
510same as \helpref{GetPathSeparators}{wxfilenamegetpathseparators} except for VMS
511path format where $]$ is used at the end of the path part.
512
513
8b4b9395
VZ
514\membersection{wxFileName::GetPathWithSep}\label{wxfilenamegetpathwithsep}
515
516\constfunc{wxString}{GetPathWithSep}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
517
518Returns the path with the trailing separator, useful for appending the name to
519the given path.
520
521This is the same as calling \helpref{GetPath}{wxfilenamegetpath}
522\texttt{(wxPATH\_GET\_VOLUME | wxPATH\_GET\_SEPARATOR, format)}.
523
524
2569938d
VZ
525\membersection{wxFileName::GetShortPath}\label{wxfilenamegetshortpath}
526
527\constfunc{wxString}{GetShortPath}{\void}
528
95c00185 529Return the short form of the path (returns identity on non-Windows platforms).
2569938d 530
5bb9aeb2 531
23b8a262
JS
532\membersection{wxFileName::GetSize}\label{wxfilenamegetsize}
533
534\constfunc{wxULongLong}{GetSize}{\void}
535
536\func{static wxULongLong}{GetSize}{\param{const wxString\& }{filename}}
537
538Returns the size of this file (first form) or the size of the given file (second form).
539If the file does not exist or its size could not be read (because e.g. the file is locked
540by another process) the returned value is {\tt wxInvalidSize}.
541
542
543\membersection{wxFileName::GetHumanReadableSize}\label{wxfilenamegethumanreadablesize}
544
545\constfunc{wxString}{GetHumanReadableSize}{\param{const wxString\& }{failmsg = "Not available"}, \param{int }{precision = 1}}
546
547\func{static wxString}{GetHumanReadableSize}{\param{const wxULongLong\& }{bytes}, \param{const wxString\& }{nullsize = "Not available"}, \param{int }{precision = 1}}
548
549Returns the size of this file (first form) or the given number of bytes (second form)
550in a human-readable form.
551
552If the size could not be retrieved the {\tt failmsg} string is returned (first form).
553If {\tt bytes} is {\tt wxInvalidSize} or zero, then {\tt nullsize} is returned (second form).
554
555In case of success, the returned string is a floating-point number with {\tt precision} decimal digits
556followed by the size unit (B, kB, MB, GB, TB: respectively bytes, kilobytes, megabytes, gigabytes, terabytes).
557
558
2569938d
VZ
559\membersection{wxFileName::GetTimes}\label{wxfilenamegettimes}
560
6dbb903b 561\constfunc{bool}{GetTimes}{\param{wxDateTime* }{dtAccess}, \param{wxDateTime* }{dtMod}, \param{wxDateTime* }{dtCreate}}
2569938d 562
95c00185 563Returns the last access, last modification and creation times. The last access
ebb39671
VZ
564time is updated whenever the file is read or written (or executed in the case
565of Windows), last modification time is only changed when the file is written
566to. Finally, the creation time is indeed the time when the file was created
567under Windows and the inode change time under Unix (as it is impossible to
568retrieve the real file creation time there anyhow) which can also be changed
569by many operations after the file creation.
2569938d 570
95c00185 571Any of the pointers may be {\tt NULL} if the corresponding time is not
ebb39671
VZ
572needed.
573
574\wxheading{Return value}
575
0894707e 576{\tt true} on success, {\tt false} if we failed to retrieve the times.
2569938d 577
5bb9aeb2 578
2569938d
VZ
579\membersection{wxFileName::GetVolume}\label{wxfilenamegetvolume}
580
581\constfunc{wxString}{GetVolume}{\void}
582
f70c0443 583Returns the string containing the volume for this file name, empty if it
ebb39671
VZ
584doesn't have one or if the file system doesn't support volumes at all (for
585example, Unix).
2569938d 586
5bb9aeb2 587
2569938d
VZ
588\membersection{wxFileName::GetVolumeSeparator}\label{wxfilenamegetvolumeseparator}
589
f363e05c 590\func{static wxString}{GetVolumeSeparator}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
2569938d 591
95c00185 592Returns the string separating the volume from the path for this format.
2569938d 593
5bb9aeb2 594
2569938d
VZ
595\membersection{wxFileName::HasExt}\label{wxfilenamehasext}
596
597\constfunc{bool}{HasExt}{\void}
598
f363e05c 599Returns {\tt true} if an extension is present.
2569938d 600
5bb9aeb2 601
2569938d
VZ
602\membersection{wxFileName::HasName}\label{wxfilenamehasname}
603
604\constfunc{bool}{HasName}{\void}
605
f363e05c 606Returns {\tt true} if a name is present.
2569938d 607
5bb9aeb2 608
2569938d
VZ
609\membersection{wxFileName::HasVolume}\label{wxfilenamehasvolume}
610
611\constfunc{bool}{HasVolume}{\void}
612
f363e05c 613Returns {\tt true} if a volume specifier is present.
2569938d 614
5bb9aeb2 615
2569938d
VZ
616\membersection{wxFileName::InsertDir}\label{wxfilenameinsertdir}
617
2458d90b 618\func{void}{InsertDir}{\param{size\_t }{before}, \param{const wxString\& }{dir}}
2569938d 619
5bb9aeb2
VZ
620Inserts a directory component before the zero-based position in the directory
621list. Please see \helpref{AppendDir}{wxfilenameappenddir} for important notes.
622
2569938d
VZ
623
624\membersection{wxFileName::IsAbsolute}\label{wxfilenameisabsolute}
625
626\func{bool}{IsAbsolute}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
627
f363e05c 628Returns {\tt true} if this filename is absolute.
2569938d 629
5bb9aeb2 630
2569938d
VZ
631\membersection{wxFileName::IsCaseSensitive}\label{wxfilenameiscasesensitive}
632
f363e05c 633\func{static bool}{IsCaseSensitive}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
2569938d 634
f363e05c 635Returns {\tt true} if the file names of this type are case-sensitive.
2569938d 636
5bb9aeb2 637
3ff07edb
RR
638\membersection{wxFileName::IsDirReadable}\label{wxfilenameisdirreadable}
639
640\constfunc{bool}{IsDirReadable}{\void}
641
642\func{static bool}{IsDirReadable}{\param{const wxString\& }{dir}}
643
644Returns {\tt true} if the directory component of this instance (or given \arg{dir})
645is an existing directory and this process has read permissions on it.
646Read permissions on a directory mean that you can list the directory contents but it
647doesn't imply that you have read permissions on the files contained.
648
649
650\membersection{wxFileName::IsDirWritable}\label{wxfilenameisdirwritable}
651
652\constfunc{bool}{IsDirWritable}{\void}
653
654\func{static bool}{IsDirWritable}{\param{const wxString\& }{dir}}
655
656Returns {\tt true} if the directory component of this instance (or given \arg{dir})
657is an existing directory and this process has write permissions on it.
658Write permissions on a directory mean that you can create new files in the directory.
659
660
661\membersection{wxFileName::IsFileExecutable}\label{wxfilenameisfileexecutable}
662
663\constfunc{bool}{IsFileExecutable}{\void}
664
665\func{static bool}{IsFileExecutable}{\param{const wxString\& }{file}}
666
667Returns {\tt true} if a file with this name exists and if this process has execute permissions on it.
668
669
670\membersection{wxFileName::IsFileReadable}\label{wxfilenameisfilereadable}
671
672\constfunc{bool}{IsFileReadable}{\void}
673
674\func{static bool}{IsFileReadable}{\param{const wxString\& }{file}}
675
676Returns {\tt true} if a file with this name exists and if this process has read permissions on it.
677
678
679\membersection{wxFileName::IsFileWritable}\label{wxfilenameisfilewritable}
680
681\constfunc{bool}{IsFileWritable}{\void}
682
683\func{static bool}{IsFileWritable}{\param{const wxString\& }{file}}
684
685Returns {\tt true} if a file with this name exists and if this process has write permissions on it.
686
687
2569938d
VZ
688\membersection{wxFileName::IsOk}\label{wxfilenameisok}
689
690\constfunc{bool}{IsOk}{\void}
691
0894707e 692Returns {\tt true} if the filename is valid, {\tt false} if it is not
ade35f11
VZ
693initialized yet. The assignment functions and
694\helpref{Clear}{wxfilenameclear} may reset the object to the uninitialized,
695invalid state (the former only do it on failure).
2569938d 696
5bb9aeb2 697
2569938d
VZ
698\membersection{wxFileName::IsPathSeparator}\label{wxfilenameispathseparator}
699
f363e05c 700\func{static bool}{IsPathSeparator}{\param{wxChar }{ch}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
2569938d 701
0894707e 702Returns {\tt true} if the char is a path separator for this format.
2569938d 703
5bb9aeb2 704
2569938d
VZ
705\membersection{wxFileName::IsRelative}\label{wxfilenameisrelative}
706
707\func{bool}{IsRelative}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
708
0894707e 709Returns {\tt true} if this filename is not absolute.
2569938d 710
5bb9aeb2 711
2db991f4 712\membersection{wxFileName::IsDir}\label{wxfilenameisdir}
2569938d 713
2db991f4 714\constfunc{bool}{IsDir}{\void}
2569938d 715
0894707e 716Returns {\tt true} if this object represents a directory, {\tt false} otherwise
2db991f4
VZ
717(i.e. if it is a file). Note that this method doesn't test whether the
718directory or file really exists, you should use
719\helpref{DirExists}{wxfilenamedirexists} or
720\helpref{FileExists}{wxfilenamefileexists} for this.
2569938d 721
5ab2950d
JS
722\membersection{wxFileName::MacFindDefaultTypeAndCreator}\label{wxfilenamemacfinddefaulttypeandcreator}
723
724\func{static bool}{MacFindDefaultTypeAndCreator}{\param{const wxString\& }{ext}, \param{wxUint32* }{type}, \param{wxUint32* }{creator}}
725
726On Mac OS, gets the common type and creator for the given extension.
727
728\membersection{wxFileName::MacRegisterDefaultTypeAndCreator}\label{wxfilenamemacregisterdefaulttypeandcreator}
729
730\func{static void}{MacRegisterDefaultTypeAndCreator}{\param{const wxString\& }{ext}, \param{wxUint32 }{type}, \param{wxUint32 }{creator}}
731
732On Mac OS, registers application defined extensions and their default type and creator.
733
734\membersection{wxFileName::MacSetDefaultTypeAndCreator}\label{wxfilenamemacsetdefaulttypeandcreator}
735
736\func{bool}{MacSetDefaultTypeAndCreator}{\void}
737
738On Mac OS, looks up the appropriate type and creator from the registration and then sets it.
5bb9aeb2 739
0894707e
VS
740\membersection{wxFileName::MakeAbsolute}\label{wxfilenamemakeabsolute}
741
742\func{bool}{MakeAbsolute}{\param{const wxString\& }{cwd = wxEmptyString}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
743
744Make the file name absolute. This is a shortcut for
745{\tt \helpref{Normalize}{wxfilenamenormalize}(wxPATH\_NORM\_DOTS | wxPATH\_NORM\_ABSOLUTE | wxPATH\_NORM\_TILDE, cwd, format)}.
746
747\wxheading{See also}
748
749\helpref{MakeRelativeTo}{wxfilenamemakerelativeto},
750\helpref{Normalize}{wxfilenamenormalize},
751\helpref{IsAbsolute}{wxfilenameisabsolute}
752
5bb9aeb2 753
f7d886af
VZ
754\membersection{wxFileName::MakeRelativeTo}\label{wxfilenamemakerelativeto}
755
f363e05c 756\func{bool}{MakeRelativeTo}{\param{const wxString\& }{pathBase = wxEmptyString}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
f7d886af
VZ
757
758This function tries to put this file name in a form relative to {\it pathBase}.
759In other words, it returns the file name which should be used to access this
760file if the current directory were {\it pathBase}.
761
762\docparam{pathBase}{the directory to use as root, current directory is used by
763default}
764
765\docparam{format}{the file name format, native by default}
766
767\wxheading{Return value}
768
0894707e 769{\tt true} if the file name has been changed, {\tt false} if we failed to do
f7d886af
VZ
770anything with it (currently this only happens if the file name is on a volume
771different from the volume specified by {\it pathBase}).
772
773\wxheading{See also}
774
775\helpref{Normalize}{wxfilenamenormalize}
2569938d 776
5bb9aeb2 777
2569938d
VZ
778\membersection{wxFileName::Mkdir}\label{wxfilenamemkdir}
779
1527281e 780\func{bool}{Mkdir}{\param{int }{perm = 0777}, \param{int }{flags = $0$}}
2569938d 781
1527281e 782\func{static bool}{Mkdir}{\param{const wxString\& }{dir}, \param{int }{perm = 0777}, \param{int }{flags = $0$}}
2569938d 783
6f91bc33 784\docparam{dir}{the directory to create}
2569938d 785
6f91bc33
VZ
786\docparam{parm}{the permissions for the newly created directory}
787
1527281e
VZ
788\docparam{flags}{if the flags contain {\tt wxPATH\_MKDIR\_FULL} flag,
789try to create each directory in the path and also don't return an error
790if the target directory already exists.}
2569938d 791
6f91bc33 792\wxheading{Return value}
2569938d 793
0894707e 794Returns {\tt true} if the directory was successfully created, {\tt false}
6f91bc33 795otherwise.
2569938d 796
5bb9aeb2 797
2569938d
VZ
798\membersection{wxFileName::Normalize}\label{wxfilenamenormalize}
799
32a0d013 800\func{bool}{Normalize}{\param{int }{flags = wxPATH\_NORM\_ALL}, \param{const wxString\& }{cwd = wxEmptyString}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
2569938d 801
0894707e 802Normalize the path. With the default flags value, the path will be
2569938d 803made absolute, without any ".." and "." and all environment
0894707e
VS
804variables will be expanded in it.
805
806\docparam{flags}{The kind of normalization to do with the file name. It can be
807any or-combination of the following constants:
d2c2afc9 808
0894707e
VS
809\begin{twocollist}
810\twocolitem{{\bf wxPATH\_NORM\_ENV\_VARS}}{replace env vars with their values}
811\twocolitem{{\bf wxPATH\_NORM\_DOTS}}{squeeze all .. and . and prepend cwd}
812\twocolitem{{\bf wxPATH\_NORM\_TILDE}}{Unix only: replace ~ and ~user}
08890e27 813\twocolitem{{\bf wxPATH\_NORM\_CASE}}{if filesystem is case insensitive, transform to lower case}
0894707e
VS
814\twocolitem{{\bf wxPATH\_NORM\_ABSOLUTE}}{make the path absolute}
815\twocolitem{{\bf wxPATH\_NORM\_LONG}}{make the path the long form}
21f60945 816\twocolitem{{\bf wxPATH\_NORM\_SHORTCUT}}{resolve if it is a shortcut (Windows only)}
ef92f440 817\twocolitem{{\bf wxPATH\_NORM\_ALL}}{all of previous flags except \texttt{wxPATH\_NORM\_CASE}}
0894707e 818\end{twocollist}
d2c2afc9 819}%
0894707e
VS
820
821\docparam{cwd}{If not empty, this directory will be used instead of current
822working directory in normalization.}
823
824\docparam{format}{The file name format, native by default.}
2569938d 825
5bb9aeb2 826
2569938d
VZ
827\membersection{wxFileName::PrependDir}\label{wxfilenameprependdir}
828
829\func{void}{PrependDir}{\param{const wxString\& }{dir}}
830
5bb9aeb2
VZ
831Prepends a directory to the file path. Please see
832\helpref{AppendDir}{wxfilenameappenddir} for important notes.
833
834
2569938d
VZ
835
836\membersection{wxFileName::RemoveDir}\label{wxfilenameremovedir}
837
2458d90b 838\func{void}{RemoveDir}{\param{size\_t }{pos}}
2569938d 839
2458d90b
VZ
840Removes the specified directory component from the path.
841
842\wxheading{See also}
843
844\helpref{GetDirCount}{wxfilenamegetdircount}
845
846
847\membersection{wxFileName::RemoveLastDir}\label{wxfilenameremovelastdir}
848
849\func{void}{RemoveLastDir}{\void}
850
851Removes last directory component from the path.
2569938d 852
5bb9aeb2 853
2569938d
VZ
854\membersection{wxFileName::Rmdir}\label{wxfilenamermdir}
855
856\func{bool}{Rmdir}{\void}
857
6f91bc33 858\func{static bool}{Rmdir}{\param{const wxString\& }{dir}}
2569938d 859
95c00185 860Deletes the specified directory from the file system.
2569938d 861
5bb9aeb2 862
2569938d
VZ
863\membersection{wxFileName::SameAs}\label{wxfilenamesameas}
864
2b5f62a0 865\constfunc{bool}{SameAs}{\param{const wxFileName\& }{filepath}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
2569938d 866
95c00185 867Compares the filename using the rules of this platform.
2569938d 868
5bb9aeb2 869
2569938d
VZ
870\membersection{wxFileName::SetCwd}\label{wxfilenamesetcwd}
871
872\func{bool}{SetCwd}{\void}
873
6f91bc33 874\func{static bool}{SetCwd}{\param{const wxString\& }{cwd}}
2569938d 875
95c00185 876Changes the current working directory.
2569938d 877
5bb9aeb2 878
2569938d
VZ
879\membersection{wxFileName::SetExt}\label{wxfilenamesetext}
880
881\func{void}{SetExt}{\param{const wxString\& }{ext}}
882
0b40f3d8
RR
883Sets the extension of the file name. Setting an empty string
884as the extension will remove the extension resulting in a file
885name without a trailing dot, unlike a call to
886\helpref{SetEmptyExt}{wxfilenamesetemptyext}.
887
888\wxheading{See also}
889
890\helpref{SetEmptyExt}{wxfilenamesetemptyext}
891\helpref{ClearExt}{wxfilenameclearext}
892
893\membersection{wxFileName::SetEmptyExt}\label{wxfilenamesetemptyext}
894
895\func{void}{SetEmptyExt}{\void}
896
897Sets the extension of the file name to be an empty extension.
898This is different from having no extension at all as the file
899name will have a trailing dot after a call to this method.
900
901\wxheading{See also}
2569938d 902
0b40f3d8
RR
903\helpref{SetExt}{wxfilenamesetext}
904\helpref{ClearExt}{wxfilenameclearext}
5bb9aeb2 905
2569938d
VZ
906\membersection{wxFileName::SetFullName}\label{wxfilenamesetfullname}
907
908\func{void}{SetFullName}{\param{const wxString\& }{fullname}}
909
95c00185 910The full name is the file name and extension (but without the path).
2569938d 911
5bb9aeb2 912
2569938d
VZ
913\membersection{wxFileName::SetName}\label{wxfilenamesetname}
914
915\func{void}{SetName}{\param{const wxString\& }{name}}
916
4e43c815
VZ
917Sets the name part (without extension).
918
919\wxheading{See also}
920
921\helpref{SetFullName}{wxfilenamesetfullname}
2569938d 922
5bb9aeb2 923
2569938d
VZ
924\membersection{wxFileName::SetTimes}\label{wxfilenamesettimes}
925
6dbb903b 926\func{bool}{SetTimes}{\param{const wxDateTime* }{dtAccess}, \param{const wxDateTime* }{dtMod}, \param{const wxDateTime* }{dtCreate}}
2569938d 927
95c00185 928Sets the file creation and last access/modification times (any of the pointers may be NULL).
2569938d 929
5bb9aeb2 930
2569938d
VZ
931\membersection{wxFileName::SetVolume}\label{wxfilenamesetvolume}
932
933\func{void}{SetVolume}{\param{const wxString\& }{volume}}
934
95c00185 935Sets the volume specifier.
2569938d 936
5bb9aeb2 937
2569938d
VZ
938\membersection{wxFileName::SplitPath}\label{wxfilenamesplitpath}
939
dfecbee5
VZ
940\func{static void}{SplitPath}{\param{const wxString\& }{fullpath}, \param{wxString* }{volume}, \param{wxString* }{path}, \param{wxString* }{name}, \param{wxString* }{ext}, \param{bool }{*hasExt = \texttt{NULL}}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
941
2bd25c5a 942\func{static void}{SplitPath}{\param{const wxString\& }{fullpath}, \param{wxString* }{volume}, \param{wxString* }{path}, \param{wxString* }{name}, \param{wxString* }{ext}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
2569938d 943
2bd25c5a 944\func{static void}{SplitPath}{\param{const wxString\& }{fullpath}, \param{wxString* }{path}, \param{wxString* }{name}, \param{wxString* }{ext}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
2569938d 945
2bd25c5a
VZ
946This function splits a full file name into components: the volume (with the
947first version) path (including the volume in the second version), the base name
948and the extension. Any of the output parameters ({\it volume}, {\it path},
949{\it name} or {\it ext}) may be {\tt NULL} if you are not interested in the
950value of a particular component. Also, {\it fullpath} may be empty on entry.
951
952On return, {\it path} contains the file path (without the trailing separator),
953{\it name} contains the file name and {\it ext} contains the file extension
954without leading dot. All three of them may be empty if the corresponding
955component is. The old contents of the strings pointed to by these parameters
956will be overwritten in any case (if the pointers are not {\tt NULL}).
2569938d 957
dfecbee5
VZ
958Note that for a filename ``foo.'' the extension is present, as indicated by the
959trailing dot, but empty. If you need to cope with such cases, you should use
960\arg{hasExt} instead of relying on testing whether \arg{ext} is empty or not.
961
5bb9aeb2 962
f1e77933
VZ
963\membersection{wxFileName::SplitVolume}\label{wxfilenamesplitvolume}
964
965\func{static void}{SplitVolume}{\param{const wxString\& }{fullpath}, \param{wxString* }{volume}, \param{wxString* }{path}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
966
967Splits the given \arg{fullpath} into the volume part (which may be empty) and
968the pure path part, not containing any volume.
969
970\wxheading{See also}
971
972\helpref{SplitPath}{wxfilenamesplitpath}
973
974
2569938d
VZ
975\membersection{wxFileName::Touch}\label{wxfilenametouch}
976
977\func{bool}{Touch}{\void}
978
95c00185 979Sets the access and modification times to the current moment.
2569938d 980
5bb9aeb2 981
2569938d
VZ
982\membersection{wxFileName::operator=}\label{wxfilenameoperatorassign}
983
984\func{wxFileName\& operator}{operator=}{\param{const wxFileName\& }{filename}}
985
2569938d
VZ
986\func{wxFileName\& operator}{operator=}{\param{const wxString\& }{filename}}
987
6f91bc33 988Assigns the new value to this filename object.
2569938d 989
5bb9aeb2 990
2569938d
VZ
991\membersection{wxFileName::operator==}\label{wxfilenameoperatorequal}
992
2b5f62a0 993\constfunc{bool operator}{operator==}{\param{const wxFileName\& }{filename}}
2569938d 994
2b5f62a0 995\constfunc{bool operator}{operator==}{\param{const wxString\& }{filename}}
2569938d 996
0894707e 997Returns {\tt true} if the filenames are equal. The string {\it filenames} is
2b5f62a0
VZ
998interpreted as a path in the native filename format.
999
5bb9aeb2 1000
2b5f62a0
VZ
1001\membersection{wxFileName::operator!=}\label{wxfilenameoperatornotequal}
1002
1003\constfunc{bool operator}{operator!=}{\param{const wxFileName\& }{filename}}
1004
1005\constfunc{bool operator}{operator!=}{\param{const wxString\& }{filename}}
1006
0894707e 1007Returns {\tt true} if the filenames are different. The string {\it filenames}
2b5f62a0 1008is interpreted as a path in the native filename format.
6f91bc33 1009