source: other-projects/gs2-export-cdrom-installer/trunk/file.h@ 29004

Last change on this file since 29004 was 11664, checked in by mdewsnip, 18 years ago

Fixed the line endings... for real this time, I hope.

  • Property svn:keywords set to Author Date Id Revision
File size: 990 bytes
Line 
1#ifndef _FILE_H_
2#include <vector>
3#include <string>
4
5// use the standard namespace
6#if !defined (GSDL_NAMESPACE_BROKEN)
7#if defined(GSDL_USE_OBJECTSPACE)
8using namespace ospace::std;
9#else
10using namespace std;
11#endif
12#endif
13
14#include "DiskSpace.h"
15#include "FilePath.h"
16
17class File : public FilePath
18{
19private:
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();
29protected:
30public:
31 File();
32 File(string filename);
33 void copy(char *destination);
34 bool remove();
35 bool isDirectory();
36 bool isWriteable();
37 bool exists();
38 unsigned long getRawFileSize();
39 void getFileSize(unsigned long &dataSize, unsigned long &dataFiles);
40 unsigned long getFileSize();
41 // const char *cString();
42 unsigned long getDiskSpace(DiskSpace &diskSpace);
43 vector<File>::iterator childBegin();
44 vector<File>::iterator childEnd();
45};
46
47typedef vector<File> FileVector;
48#define _FILE_H_
49#endif
Note: See TracBrowser for help on using the repository browser.