+
+ // the usual stuff
+ wxFileName() { }
+ wxFileName( const wxFileName &filepath ) { Assign(filepath); }
+
+ // from a full filename: if it terminates with a '/', a directory path
+ // is contructed (the name will be empty), otherwise a file name and
+ // extension are extracted from it
+ wxFileName( const wxString& fullpath, wxPathFormat format = wxPATH_NATIVE )
+ { Assign( fullpath, format ); }
+
+ // from a directory name and a file name
+ wxFileName(const wxString& path,
+ const wxString& name,
+ wxPathFormat format = wxPATH_NATIVE)
+ { Assign(path, name, format); }
+
+ // from a volume, directory name, file base name and extension
+ wxFileName(const wxString& volume,
+ const wxString& path,
+ const wxString& name,
+ const wxString& ext,
+ wxPathFormat format = wxPATH_NATIVE)
+ { Assign(volume, path, name, ext, format); }
+
+ // from a directory name, file base name and extension
+ wxFileName(const wxString& path,
+ const wxString& name,
+ const wxString& ext,
+ wxPathFormat format = wxPATH_NATIVE)
+ { Assign(path, name, ext, format); }
+
+ // the same for delayed initialization
+
+ void Assign(const wxFileName& filepath);
+
+ void Assign(const wxString& fullpath,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ void Assign(const wxString& volume,
+ const wxString& path,
+ const wxString& name,
+ const wxString& ext,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ void Assign(const wxString& path,
+ const wxString& name,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ void Assign(const wxString& path,
+ const wxString& name,
+ const wxString& ext,
+ wxPathFormat format = wxPATH_NATIVE)
+ {
+ // empty volume
+ Assign(_T(""), path, name, ext, format);
+ }
+
+ void AssignDir(const wxString& dir, wxPathFormat format = wxPATH_NATIVE);
+
+ // assorted assignment operators
+
+ wxFileName& operator=(const wxFileName& filename)
+ { Assign(filename); return *this; }
+
+ wxFileName& operator=(const wxString& filename)
+ { Assign(filename); return *this; }
+
+ // reset all components to default, uninitialized state
+ void Clear();
+
+ // static pseudo constructors
+ static wxFileName FileName(const wxString& file);
+ static wxFileName DirName(const wxString& dir);
+
+ // file tests
+
+ // is the filename valid at all?
+ bool IsOk() const { return !m_dirs.IsEmpty() || !m_name.IsEmpty(); }
+
+ // does the file with this name exists?