Last change
on this file since 1657 was 1541, checked in by cs025, 24 years ago |
Fixes for WindowsNT. Also made File class subclass of FilePath class.
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
902 bytes
|
Rev | Line | |
---|
[1536] | 1 | #ifndef _FILE_H_
|
---|
| 2 | #include <vector>
|
---|
| 3 | #include <string>
|
---|
[1539] | 4 |
|
---|
| 5 | // use the standard namespace
|
---|
| 6 | #if !defined (GSDL_NAMESPACE_BROKEN)
|
---|
| 7 | #if defined(GSDL_USE_OBJECTSPACE)
|
---|
| 8 | using namespace ospace::std;
|
---|
| 9 | #else
|
---|
[1536] | 10 | using namespace std;
|
---|
[1539] | 11 | #endif
|
---|
| 12 | #endif
|
---|
[1536] | 13 |
|
---|
| 14 | #include "DiskSpace.h"
|
---|
[1541] | 15 | #include "FilePath.h"
|
---|
[1536] | 16 |
|
---|
[1541] | 17 | class File : public FilePath
|
---|
[1536] | 18 | {
|
---|
| 19 | private:
|
---|
| 20 | string name;
|
---|
| 21 | unsigned long size;
|
---|
| 22 | vector<File> children;
|
---|
| 23 | bool is_dir;
|
---|
| 24 | bool does_exist;
|
---|
| 25 | bool is_writable;
|
---|
| 26 |
|
---|
| 27 | void _getDetails();
|
---|
| 28 | void getChildren();
|
---|
| 29 | protected:
|
---|
| 30 | public:
|
---|
| 31 | File();
|
---|
| 32 | File(string filename);
|
---|
| 33 | void copy(char *destination);
|
---|
| 34 | bool isDirectory();
|
---|
| 35 | bool isWriteable();
|
---|
| 36 | bool exists();
|
---|
| 37 | unsigned long getRawFileSize();
|
---|
| 38 | unsigned long getFileSize();
|
---|
[1541] | 39 | // const char *cString();
|
---|
[1536] | 40 | unsigned long getDiskSpace(DiskSpace &diskSpace);
|
---|
| 41 | vector<File>::iterator childBegin();
|
---|
| 42 | vector<File>::iterator childEnd();
|
---|
| 43 | };
|
---|
| 44 |
|
---|
| 45 | typedef vector<File> FileVector;
|
---|
| 46 | #define _FILE_H_
|
---|
| 47 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.