Last change
on this file since 1502 was 1397, checked in by cs025, 24 years ago |
Initial revision
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
857 bytes
|
Line | |
---|
1 | #ifndef _FILE_H_
|
---|
2 | #include <vector>
|
---|
3 | #include <string>
|
---|
4 | using namespace std;
|
---|
5 |
|
---|
6 | #include "DiskSpace.h"
|
---|
7 |
|
---|
8 | class File
|
---|
9 | { private:
|
---|
10 | string name;
|
---|
11 | unsigned long size;
|
---|
12 | vector<File> children;
|
---|
13 | bool is_dir;
|
---|
14 | bool does_exist;
|
---|
15 | bool is_writable;
|
---|
16 |
|
---|
17 | void _getDetails();
|
---|
18 | void getChildren();
|
---|
19 | protected:
|
---|
20 | public:
|
---|
21 | File();
|
---|
22 | File(string filename, unsigned long filesize);
|
---|
23 | File(string filename);
|
---|
24 | void copy(char *destination);
|
---|
25 | bool isDirectory();
|
---|
26 | bool isWriteable();
|
---|
27 | bool exists();
|
---|
28 | unsigned long getRawFileSize();
|
---|
29 | unsigned long getFileSize();
|
---|
30 | const char *getFileName();
|
---|
31 | unsigned long getDiskSpace(DiskSpace &diskSpace);
|
---|
32 | vector<File>::iterator childBegin();
|
---|
33 | vector<File>::iterator childEnd();
|
---|
34 | };
|
---|
35 |
|
---|
36 | typedef vector<File> FileVector;
|
---|
37 | #define _FILE_H_
|
---|
38 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.