-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_ls.h
42 lines (38 loc) · 1.76 KB
/
ft_ls.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ls.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mel-idri <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/11/28 10:55:09 by ylagtab #+# #+# */
/* Updated: 2021/01/16 17:17:01 by mel-idri ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FT_LS_H
# define FT_LS_H
# include <sys/types.h>
# include <sys/stat.h>
# include <sys/acl.h>
# include <sys/xattr.h>
# include <unistd.h>
# include <errno.h>
# include <dirent.h>
# include <time.h>
# include "libft/libft.h"
# include <stdio.h>
# include "includes/typedefs_macros.h"
# include "get_cmp_func/get_cmp_func.h"
extern int g_reverse_sort;
t_inode *new_inode(t_inode *inode, struct stat *st, char *path, char *name);
t_error *new_error(t_error *error, char *path);
void ft_parse(t_args *ls_args, char **av);
void handle_link(t_inode *inode, t_args *ls_args);
void print_error(char *filename);
void print_errors(t_queue *errors);
void print_inodes(t_queue *inodes, int is_dir);
void print_inodes_default(t_queue *inodes);
void print_inodes_longlist(t_queue *inodes, int is_dir);
void list_directories(t_queue *dirs);
t_queue *sort_list(t_queue *files, t_cmp_func cmp_func);
#endif