source: trunk/gsinstaller/file.h@ 2013

Last change on this file since 2013 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
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 isDirectory();
35 bool isWriteable();
36 bool exists();
37 unsigned long getRawFileSize();
38 unsigned long getFileSize();
39 // const char *cString();
40 unsigned long getDiskSpace(DiskSpace &diskSpace);
41 vector<File>::iterator childBegin();
42 vector<File>::iterator childEnd();
43};
44
45typedef vector<File> FileVector;
46#define _FILE_H_
47#endif
Note: See TracBrowser for help on using the repository browser.