-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFilemanager.h
85 lines (48 loc) · 1.46 KB
/
Filemanager.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#ifndef FILEMANAGER_H
#define FILEMANAGER_H
#include <iostream>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <string.h>
#include <fstream>
#include <vector>
class Filemanager{
private:
int f_size, f_ownernumber,grp_idnumber, blk_size, error_num = 0;
std :: string file_type,f_ownerstring, grp_idstring;
std :: string f_name, f_permissions;
mode_t f_mode;
std :: vector<Filemanager> children;
struct stat buffer;
time_t file_accesstime, file_modificationtime, file_statuschange;
public:
Filemanager (char *filename);
~Filemanager();
int dump_file(std :: ostream * contents_destination);
int rename_file(char * newname);
int remove_file();
int compare_files(Filemanager newobject);
int Expand();
std::string getFileName();
int setFileName(char * file_name);
std :: string getfile_type();
mode_t getFilemode();
std :: string get_ownerstring();
std :: string get_grp_id_string();
void getsetfile_type(mode_t name,struct stat buf);
void printPermissions(mode_t name,struct stat buf);
void reset_attributes();
int get_grp_id_number();
int get_ownernumber();
int get_filesize();
int get_blksize();
struct stat getBuffer();
std :: vector<Filemanager> getChildren();
time_t getAccesstime();
time_t getmodtime();
time_t getstatuschange();
int geterr_num();
std :: string geterr_message(int errnum);
};
#endif