-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist.h
90 lines (60 loc) · 1.61 KB
/
list.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
84
85
86
87
88
89
90
#ifndef LIST_H
# define LIST_H
# include <stdlib.h>
# include <unistd.h>
# include <dirent.h>
# include <errno.h>
# include <stdio.h>
# include <string.h>
# include <sys/types.h>
# include <sys/stat.h>
# include <pwd.h>
# include <grp.h>
# include <time.h>
typedef struct s_list
{
char *name;
struct s_list *next;
} t_list;
typedef struct s_info
{
int dirs;
int flags;
char **ndirs;
char *nflags;
} t_info;
typedef struct s_opt
{
int lon;
int rec;
int rev;
int hid;
int tim;
int one;
} t_opt;
t_info *ft_info(char *argv[]);
char *get_flags(char *argv[], int *nflags);
int nget_flags(char *argv[]);
t_info *ft_no_args();
char **get_dirs(char *argv[], int *nrdirs);
int nget_dirs(char *argv[]);
size_t ft_strlen(const char *str);
char *ft_strcpy(char *dest, const char *src);
void ft_list(t_info *info);
void ft_show(DIR *dr, t_info *info);
void ft_rec(char *path, t_opt *options);
char *ft_createpath(char *path, char *new_path);
t_opt *ft_options(t_info *info);
void ft_simple(char *path, t_opt *options);
void ft_pwrite(char *name, t_opt *options, char *path);
char **ft_sort(DIR *dr, t_opt* options);
char **ft_matsort(char **result, int x);
int ft_strcmp(const char *str1, const char *str2);
void ft_privs(struct stat *fileStat);
char **ft_revsort(char **result, int x);
char **ft_timesort(char **result, int x);
int ft_cmptime(char *first, char *second);
char **ft_timerev(char **result, int x);
int ft_gettotal(char **folders, t_opt *options, char *path);
int ft_veropt(t_opt *options, t_info *info);
#endif