-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFile.h
51 lines (40 loc) · 947 Bytes
/
File.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* File: File.h
* Author: User
*
* Created on 14 Январь 2012 г., 23:35
*/
#ifndef _FILE_H
#define _FILE_H
#include <sys/stat.h>
#include <libgen.h>
#include <vector>
#include "String.h"
class RandomAccessFile;
#include "RandomAccessFile.h"
#include "IOError.h"
class File {
protected:
String name;
public:
File(const String& name);
File(const File& orig);
File(const File& parent,const String& childName);
virtual ~File();
bool File::isExists();
bool File::isFile();
bool File::isDir();
String getPath();
String getName();
File getParent();
long getSize();
bool mkdir(bool withParents);
RandomAccessFile open(const String& mode) throw (IOError);
std::vector<File> readdir();
void copy(const File& target);
static File getTempDir();
static File getCurrentDir();
static bool setCurrentDir(File& file);
bool remove();
};
#endif /* _FILE_H */