source: trunk/gsinstaller/FilePath.h@ 1406

Last change on this file since 1406 was 1397, checked in by cs025, 24 years ago

Initial revision

  • Property svn:keywords set to Author Date Id Revision
File size: 916 bytes
Line 
1#ifndef _FILEPATH_H_
2#define _FILEPATH_H_
3#include <string>
4using namespace std;
5
6class FilePath
7{ private:
8 string path; // full path of this item
9 bool is_aRoot; // indicates whether this directory/file is a file root
10 public:
11 FilePath();
12 FilePath(string filePath);
13 FilePath(string filePath, string filePath2);
14 FilePath(int nPaths, ...);
15 bool equals(FilePath &path);
16 bool equals(const char *path);
17 bool isRoot();
18 bool isEmpty();
19 FilePath *append(FilePath &path);
20 FilePath *append(char *path);
21 FilePath *parent();
22 FilePath *root();
23 FilePath *rootDrive();
24 bool ensureWriteablePath();
25 bool exists();
26 const char *cString();
27 string pathString();
28 bool operator==(const FilePath &b) { return this->path == b.path; }
29 bool operator<(const FilePath &b) { return this->path < b.path; }
30};
31#endif
Note: See TracBrowser for help on using the repository browser.