-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathheader.h
More file actions
57 lines (50 loc) · 979 Bytes
/
header.h
File metadata and controls
57 lines (50 loc) · 979 Bytes
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
#ifndef HEADER_H
#define HEADER_H
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#define MAX_NAME_LENGTH 255
#define MAXB 1024
typedef struct TreeNode {
char name[MAX_NAME_LENGTH];
int User_ID;
int Group_ID;
char type;
int mode;
int size;
int UID;
int GID;
int month;
int day;
int hour;
int minute;
struct TreeNode* left;
struct TreeNode* right;
struct TreeNode* parent;
struct TreeNode* children;
struct TreeNode* next_sibling;
} TreeNode;
typedef struct DirectoryTree {
TreeNode* root;
TreeNode* current;
char current_path[MAX_NAME_LENGTH * 10];
} DirectoryTree;
typedef struct ThreadArg {
DirectoryTree* dTree;
char name[MAX_NAME_LENGTH];
int mode;
} ThreadArg;
typedef struct UserList {
int User_ID;
int Group_ID;
struct UserList* next;
} UserList;
#endif // HEADER_H