-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileManager.h
More file actions
64 lines (55 loc) · 1.38 KB
/
FileManager.h
File metadata and controls
64 lines (55 loc) · 1.38 KB
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
/*Author: Michael Giancola
*Date: 03/10/2019
*Description: This file contains the private attributes of the class and all of the function declarations.
**/
#pragma once
#ifndef FILEMANAGER_H
#define FILEMANAGER_H
#include <vector>
#include <fstream>
class FileManager
{
private:
char *file_name;
mode_t type;
off_t size;
uid_t user_id;
std ::string user_name;
gid_t group_id;
std ::string group_name;
mode_t permissons;
std::string access;
std::string modifcation;
std::string status_change;
blksize_t block_size;
std::vector<FileManager> children;
int error_num;
public:
FileManager();
~FileManager();
FileManager(char *file_name);
char* getName();
mode_t getType();
mode_t getSize();
uid_t getUserID();
std::string getUserName();
gid_t getGroupID();
std::string getGroupName();
mode_t getPermissions();
std::string getAccessTime();
std::string getModification();
std::string getStatusChange();
blksize_t getBlockSize();
std::vector<FileManager> getChildren();
int getErrorNum();
std::string getErrorNumStr();
void setName(char *file_name);
std::string getPermissionsString(mode_t permissons);
std::string getFileType(mode_t type);
int dump(std::ostream& stream);
int rename_(char* name);
int remove();
std::string compare(FileManager obj);
std::string expand();
};
#endif // !FILEMANAGER_H