From d99f14c2a908b9db8d24180c9681009a4d1c0207 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 22 Jun 2020 19:48:39 +0200 Subject: Added list option and verbose mode --- inc/tar.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'inc') diff --git a/inc/tar.h b/inc/tar.h index 876c554..dcb9125 100644 --- a/inc/tar.h +++ b/inc/tar.h @@ -27,6 +27,7 @@ # include # include +# include # include # ifdef __linux__ @@ -91,13 +92,13 @@ int header_parse(char record[RECORD_SIZE], struct stat *statbuf, t_header *hea // fs.c int file_content_write(int fd, int file_fd, struct stat *statbuf); -int file_write(int fd, char file_name[PATH_MAX]); -int directory_write(int fd, char dir_name[PATH_MAX]); +int file_write(int fd, char file_name[PATH_MAX], bool verbose); +int directory_write(int fd, char dir_name[PATH_MAX], bool verbose); // archive.c int archive_dispatch_action(int archive_fd, t_args *args); -int archive_create(int archive_fd, char **files); -int archive_extract(int archive_fd); +int archive_create(int archive_fd, char **files, bool verbose); +int archive_extract(int archive_fd, bool verbose); int archive_get_fd(t_args *args); // record.c @@ -109,4 +110,8 @@ bool record_is_blank(char record[RECORD_SIZE]); // args.c bool args_parse(int argc, char **argv, t_args *args); +// utils.c +void put_file_name(char *file_name); +void put_file_verbose(t_header *header, struct stat *statbuf); + #endif // TAR_H -- cgit