implemented wxFileName::SplitPath(), wxSplitPath() now just calls it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-12-31 01:15:33 +00:00
parent 844f90fba6
commit 9e8d860761
4 changed files with 114 additions and 66 deletions

View File

@@ -17,9 +17,23 @@
#endif
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/string.h"
#endif
/*
TODO:
1. support for drives under Windows
2. more file operations:
a) chmod()
b) [acm]time() - get and set
c) file size
d) file permissions with readable accessors for most common bits
such as IsReadable() &c
e) rename()?
3. SameFileAs() function to compare inodes under Unix
*/
// ridiculously enough, this will replace DirExists with wxDirExists etc
#include "wx/filefn.h"
@@ -224,8 +238,19 @@ public:
// Construct full path with name and ext
wxString GetFullPath( wxPathFormat format = wxPATH_NATIVE ) const;
// various helpers
// get the canonical path format for this platform
static wxPathFormat GetFormat( wxPathFormat format = wxPATH_NATIVE );
// split a fullpath into path, (base) name and ext (all of the pointers
// can be NULL)
static void SplitPath(const wxString& fullpath,
wxString *path,
wxString *name,
wxString *ext,
wxPathFormat format = wxPATH_NATIVE);
private:
// the path components of the file
wxArrayString m_dirs;