git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12848
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
/*
Here are brief descriptions of the filename formats supported by this class:
/*
Here are brief descriptions of the filename formats supported by this class:
- wxPATH_UNIX: standard Unix format, absolute file names have the form
+ wxPATH_UNIX: standard Unix format, used under Darwin as well, absolute file
+ names have the form:
/dir1/dir2/.../dirN/filename, "." and ".." stand for the
current and parent directory respectively, "~" is parsed as the
user HOME and "~username" as the HOME of that user
/dir1/dir2/.../dirN/filename, "." and ".." stand for the
current and parent directory respectively, "~" is parsed as the
user HOME and "~username" as the HOME of that user
- wxPATH_DOS: DOS/Windows format, absolute file names have the form
+ wxPATH_DOS: DOS/Windows format, absolute file names have the form:
drive:\dir1\dir2\...\dirN\filename.ext where drive is a single
letter. "." and ".." as for Unix but no "~".
There are also UNC names of the form \\share\fullpath
drive:\dir1\dir2\...\dirN\filename.ext where drive is a single
letter. "." and ".." as for Unix but no "~".
There are also UNC names of the form \\share\fullpath
- wxPATH_MAC: Mac OS 8/9 format, absolute file names have the form
+ wxPATH_MAC: Mac OS 8/9 and Mac OS X under CodeWarrior 7 format, absolute file
+ names have the form
volume:dir1:...:dirN:filename
and the relative file names are either
:dir1:...:dirN:filename
or just
filename
(although :filename works as well).
volume:dir1:...:dirN:filename
and the relative file names are either
:dir1:...:dirN:filename
or just
filename
(although :filename works as well).
+ :::file is not yet supported. TODO.
wxPATH_VMS: VMS native format, absolute file names have the form
<device>:[dir1.dir2.dir3]file.txt
wxPATH_VMS: VMS native format, absolute file names have the form
<device>:[dir1.dir2.dir3]file.txt
wxFileName curDir;
format = GetFormat(format);
wxFileName curDir;
format = GetFormat(format);
// make the path absolute
if ( (flags & wxPATH_NORM_ABSOLUTE) && !IsAbsolute() )
{
// make the path absolute
if ( (flags & wxPATH_NORM_ABSOLUTE) && !IsAbsolute() )
{
// handle ~ stuff under Unix only
if ( (format == wxPATH_UNIX) && (flags & wxPATH_NORM_TILDE) )
{
// handle ~ stuff under Unix only
if ( (format == wxPATH_UNIX) && (flags & wxPATH_NORM_TILDE) )
{
{
wxString dir = dirs[n];
{
wxString dir = dirs[n];
- if ( flags && wxPATH_NORM_DOTS )
+ if ( flags & wxPATH_NORM_DOTS )
{
if ( dir == wxT(".") )
{
{
if ( dir == wxT(".") )
{