00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _SVNCPP_PATH_HPP_
00027 #define _SVNCPP_PATH_HPP_
00028
00029
00030 #include <string>
00031
00032
00033 namespace svn
00034 {
00038 class Path
00039 {
00040 private:
00041 std::string m_path;
00042
00043 bool m_pathIsUrl;
00044
00050 void init (const char * path);
00051
00052 public:
00060 Path (const std::string & path = "");
00061
00068 Path (const char * path);
00069
00075 Path (const Path & path);
00076
00080 Path& operator= (const Path&);
00081
00085 const std::string &
00086 path () const;
00087
00091 const char *
00092 c_str () const;
00093
00101 bool
00102 isset () const;
00103
00109 const bool
00110 isUrl () const;
00111
00117 void
00118 addComponent (const char * component);
00119
00120
00126 void
00127 addComponent (const std::string & component);
00128
00129
00136 void
00137 split (std::string & dirpath, std::string & basename) const;
00138
00139
00148 void
00149 split (std::string & dir, std::string & filename, std::string & ext) const;
00150
00151
00155 static Path
00156 getTempDir ();
00157
00158
00160 size_t
00161 length () const;
00162
00163
00165 std::string
00166 native () const;
00167 };
00168 }
00169
00170 #endif
00171
00172
00173
00174
00175