// Created: 28.12.2000
// RCS-ID: $Id$
// Copyright: (c) 2000 Robert Roebling
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/*
#endif
#ifdef __MWERKS__
+#ifdef __MACH__
+#include <sys/types.h>
+#include <utime.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#else
#include <stat.h>
#include <unistd.h>
#include <unix.h>
#endif
+#endif
#ifdef __WATCOMC__
#include <io.h>
// private functions
// ----------------------------------------------------------------------------
-#if defined(__WIN32__) && !defined(__WXMICROWIN__)
+#if wxUSE_DATETIME && defined(__WIN32__) && !defined(__WXMICROWIN__)
// convert between wxDateTime and FILETIME which is a 64-bit value representing
// the number of 100-nanosecond intervals since January 1, 1601.
}
}
-#endif // __WIN32__
+#endif // wxUSE_DATETIME && __WIN32__
// return a string with the volume par
static wxString wxGetVolumeString(const wxString& volume, wxPathFormat format)
// existence tests
// ----------------------------------------------------------------------------
-bool wxFileName::FileExists()
+bool wxFileName::FileExists() const
{
return wxFileName::FileExists( GetFullPath() );
}
return ::wxFileExists( file );
}
-bool wxFileName::DirExists()
+bool wxFileName::DirExists() const
{
return wxFileName::DirExists( GetFullPath() );
}
size_t count = dirs.GetCount();
for ( size_t i = 0; i < count; i++ )
{
- if ( i > 0 || filename.IsAbsolute() )
+ if ( i > 0 ||
+#if defined(__WXMAC__) && !defined(__DARWIN__)
+ // relative pathnames are exactely the other way round under mac...
+ !filename.IsAbsolute()
+#else
+ filename.IsAbsolute()
+#endif
+ )
currPath += wxFILE_SEP_PATH;
currPath += dirs[i];
// time functions
// ----------------------------------------------------------------------------
+#if wxUSE_DATETIME
+
bool wxFileName::SetTimes(const wxDateTime *dtAccess,
const wxDateTime *dtMod,
const wxDateTime *dtCreate)
return FALSE;
}
+#endif // wxUSE_DATETIME
+
#ifdef __WXMAC__
const short kMacExtensionMaxLength = 16 ;
}
MacDefaultExtensionRecord( const MacDefaultExtensionRecord& from )
{
- strcpy( m_ext , from.m_ext ) ;
+ wxStrcpy( m_ext , from.m_ext ) ;
m_type = from.m_type ;
m_creator = from.m_creator ;
}
- MacDefaultExtensionRecord( const char * extension , OSType type , OSType creator )
+ MacDefaultExtensionRecord( const wxChar * extension , OSType type , OSType creator )
{
- strncpy( m_ext , extension , kMacExtensionMaxLength ) ;
+ wxStrncpy( m_ext , extension , kMacExtensionMaxLength ) ;
m_ext[kMacExtensionMaxLength] = 0 ;
m_type = type ;
m_creator = creator ;
}
- char m_ext[kMacExtensionMaxLength] ;
+ wxChar m_ext[kMacExtensionMaxLength] ;
OSType m_type ;
OSType m_creator ;
} ;
// load the default extensions
MacDefaultExtensionRecord defaults[1] =
{
- MacDefaultExtensionRecord( "txt" , 'TEXT' , 'ttxt' ) ,
+ MacDefaultExtensionRecord( wxT("txt") , 'TEXT' , 'ttxt' ) ,
} ;
// we could load the pc exchange prefs here too
MacDefaultExtensionRecord rec ;
rec.m_type = type ;
rec.m_creator = creator ;
- strncpy( rec.m_ext , ext.Lower().c_str() , kMacExtensionMaxLength ) ;
+ wxStrncpy( rec.m_ext , ext.Lower().c_str() , kMacExtensionMaxLength ) ;
gMacDefaultExtensions.Add( rec ) ;
}
#endif