#include "wx/intl.h"
#include "wx/log.h"
#include "wx/utils.h"
+ #include "wx/crt.h"
#endif
+#include "wx/dynarray.h"
#include "wx/file.h"
#include "wx/filename.h"
#include "wx/dir.h"
#elif defined(__WIN32__) && !defined(__WXMICROWIN__)
// we must use GetFileAttributes() instead of the ANSI C functions because
// it can cope with network (UNC) paths unlike them
- DWORD ret = ::GetFileAttributes(filename);
+ DWORD ret = ::GetFileAttributes(filename.fn_str());
return (ret != (DWORD)-1) && !(ret & FILE_ATTRIBUTE_DIRECTORY);
#else // !__WIN32__
// instead of our code if available
//
// NB: 3rd parameter is bFailIfExists i.e. the inverse of overwrite
- if ( !::CopyFile(file1, file2, !overwrite) )
+ if ( !::CopyFile(file1.fn_str(), file2.fn_str(), !overwrite) )
{
wxLogSysError(_("Failed to copy the file '%s' to '%s'"),
file1.c_str(), file2.c_str());
|| (defined(__MWERKS__) && defined(__MSL__))
int res = wxRemove(file);
#elif defined(__WXMAC__)
- int res = unlink(wxFNCONV(file));
+ int res = unlink(file.fn_str());
#elif defined(__WXPALMOS__)
int res = 1;
// TODO with VFSFileDelete()
#if defined(__WXPALMOS__)
return false;
#elif defined(__WXMAC__) && !defined(__UNIX__)
- return (mkdir( wxFNCONV(dir) , 0 ) == 0);
+ return (mkdir(dir.fn_str() , 0 ) == 0);
#else // !Mac
const wxChar *dirname = dir.c_str();
return false;
#elif defined(__WIN32__) && !defined(__WXMICROWIN__)
// stat() can't cope with network paths
- DWORD ret = ::GetFileAttributes(strPath);
+ DWORD ret = ::GetFileAttributes(strPath.fn_str());
return (ret != (DWORD)-1) && (ret & FILE_ATTRIBUTE_DIRECTORY);
#elif defined(__OS2__)
#if defined(__OS2__)
if (d[1] == ':')
{
- ::DosSetDefaultDisk(1 + wxToupper(d[0]) - _T('A'));
+ ::DosSetDefaultDisk(wxToupper(d[0]) - _T('A') + 1);
// do not call DosSetCurrentDir when just changing drive,
// since it requires e.g. "d:." instead of "d:"!
if (d.length() == 2)
wxUnusedVar(d);
return false;
#else
- return (bool)(SetCurrentDirectory(d) != 0);
+ return (bool)(SetCurrentDirectory(d.fn_str()) != 0);
#endif
#else
// Must change drive, too.