source: trunk/gsinstaller/FilePath.h@ 1537

Last change on this file since 1537 was 1536, checked in by sjboddie, 24 years ago

Changes to get compiling on VC++ and gcc

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