00001 #ifndef _PATH_H_ 00002 #define _PATH_H_ 00003 00004 #include <string> 00005 00006 using namespace std; 00007 00008 class Path 00009 { 00010 private: 00011 string currentWorkingDirectory; 00012 00013 Path(); 00014 static Path *instance; 00015 00016 public: 00017 static Path* v(); 00018 00019 string get_cwd(); 00020 string convert_to_unix_path(const string &path); 00021 bool is_absolute_path(const string &path); 00022 string join(const string &path1, const string &path2); 00023 string get_absolute_path(const string &path); 00024 string normalize_path(const string &path); 00025 string get_directory_name(const string &path); 00026 }; 00027 00028 #endif