source: tags/bs/gsinstaller/FilePath.h@ 13624

Last change on this file since 13624 was 1498, checked in by cs025, 24 years ago

Further changes for uninstaller

  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 KB
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 void _init(string path, string subPath);
11 public:
12 FilePath();
13 FilePath(string filePath);
14 FilePath(string filePath, string filePath2);
15 FilePath(int nPaths, ...);
16 FilePath(FilePath &path, string subPath);
17 bool equals(FilePath &path);
18 bool equals(const char *path);
19 bool isRoot();
20 bool isEmpty();
21 FilePath *append(FilePath &path);
22 FilePath *append(char *path);
23 FilePath *parent();
24 FilePath *root();
25 FilePath *rootDrive();
26 bool ensureWriteablePath();
27 bool exists();
28 const char *cString();
29 string pathString();
30 bool operator==(const FilePath &b) { return this->path == b.path; }
31 bool operator!=(const FilePath &b) { return this->path != b.path; }
32 bool operator<(const FilePath &b) { return this->path < b.path; }
33};
34#endif
Note: See TracBrowser for help on using the repository browser.