diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-06-22 15:09:59 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-06-22 15:09:59 +0200 |
| commit | 86e8aeb5bb66ae5625002533b529752a7814e6c0 (patch) | |
| tree | bb30c103a5059c8dda817310dc57256d5b812ede /inc | |
| parent | 3f37f1c9bf64866de90ec418adcfe31b634231c2 (diff) | |
| download | tar-86e8aeb5bb66ae5625002533b529752a7814e6c0.tar.gz tar-86e8aeb5bb66ae5625002533b529752a7814e6c0.tar.bz2 tar-86e8aeb5bb66ae5625002533b529752a7814e6c0.zip | |
Added archive extracting
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/tar.h | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -65,10 +65,9 @@ typedef enum FLAG_LIST = 1 << 0, } t_flags; -// utils.c -int record_write(int fd, char *s, size_t size); -int record_write_blank(int fd, size_t count); +// header.c int header_write(int fd, char *file_name, struct stat *statbuf); +int header_parse(char record[RECORD_SIZE], struct stat *statbuf, t_header *header); // fs.c int file_content_write(int fd, int file_fd, struct stat *statbuf); @@ -79,4 +78,10 @@ int directory_write(int fd, char dir_name[PATH_MAX]); int archive_write(char *archive_file_name, char **files); int archive_read(char *archive_file_name); +// record.c +int record_write(int fd, char *s, size_t size); +int record_write_blank(int fd, size_t count); +int record_read(int fd, char record[RECORD_SIZE]); +bool record_is_blank(char record[RECORD_SIZE]); + #endif // TAR_H |
