Linux and UNIX Man Pages

Test Your Knowledge in Computers #3
Difficulty: Easy
'Hello World' is a program only for advanced programmers.
True or False?
Linux & Unix Commands - Search Man Pages

archive_read_extract_set_skip_file(3) [freebsd man page]

ARCHIVE_READ_EXTRACT(3) 				   BSD Library Functions Manual 				   ARCHIVE_READ_EXTRACT(3)

NAME
archive_read_extract, archive_read_extract2, archive_read_extract_set_progress_callback -- functions for reading streaming archives LIBRARY
Streaming Archive Library (libarchive, -larchive) SYNOPSIS
#include <archive.h> int archive_read_extract(struct archive *, struct archive_entry *, int flags); int archive_read_extract2(struct archive *src, struct archive_entry *, struct archive *dest); void archive_read_extract_set_progress_callback(struct archive *, void (*func)(void *), void *user_data); DESCRIPTION
archive_read_extract(), archive_read_extract_set_skip_file() A convenience function that wraps the corresponding archive_write_disk(3) interfaces. The first call to archive_read_extract() cre- ates a restore object using archive_write_disk_new(3) and archive_write_disk_set_standard_lookup(3), then transparently invokes archive_write_disk_set_options(3), archive_write_header(3), archive_write_data(3), and archive_write_finish_entry(3) to create the entry on disk and copy data into it. The flags argument is passed unmodified to archive_write_disk_set_options(3). archive_read_extract2() This is another version of archive_read_extract() that allows you to provide your own restore object. In particular, this allows you to override the standard lookup functions using archive_write_disk_set_group_lookup(3), and archive_write_disk_set_user_lookup(3). Note that archive_read_extract2() does not accept a flags argument; you should use archive_write_disk_set_options() to set the restore options yourself. archive_read_extract_set_progress_callback() Sets a pointer to a user-defined callback that can be used for updating progress displays during extraction. The progress function will be invoked during the extraction of large regular files. The progress function will be invoked with the pointer provided to this call. Generally, the data pointed to should include a reference to the archive object and the archive_entry object so that var- ious statistics can be retrieved for the progress display. RETURN VALUES
Most functions return zero on success, non-zero on error. The possible return codes include: ARCHIVE_OK (the operation succeeded), ARCHIVE_WARN (the operation succeeded but a non-critical error was encountered), ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the operation failed but can be retried), and ARCHIVE_FATAL (there was a fatal error; the archive should be closed immediately). ERRORS
Detailed error codes and textual descriptions are available from the archive_errno() and archive_error_string() functions. SEE ALSO
tar(1), libarchive(3), archive_read(3), archive_read_data(3), archive_read_filter(3), archive_read_format(3), archive_read_open(3), archive_read_set_options(3), archive_util(3), tar(5) BSD
February 2, 2012 BSD

Check Out this Related Man Page

ARCHIVE_READ_DATA(3)					   BSD Library Functions Manual 				      ARCHIVE_READ_DATA(3)

NAME
archive_read_data archive_read_data_block, archive_read_data_skip, archive_read_data_into_fd -- functions for reading streaming archives LIBRARY
Streaming Archive Library (libarchive, -larchive) SYNOPSIS
#include <archive.h> ssize_t archive_read_data(struct archive *, void *buff, size_t len); int archive_read_data_block(struct archive *, const void **buff, size_t *len, off_t *offset); int archive_read_data_skip(struct archive *); int archive_read_data_into_fd(struct archive *, int fd); DESCRIPTION
archive_read_data() Read data associated with the header just read. Internally, this is a convenience function that calls archive_read_data_block() and fills any gaps with nulls so that callers see a single continuous stream of data. archive_read_data_block() Return the next available block of data for this entry. Unlike archive_read_data(), the archive_read_data_block() function avoids copying data and allows you to correctly handle sparse files, as supported by some archive formats. The library guarantees that off- sets will increase and that blocks will not overlap. Note that the blocks returned from this function can be much larger than the block size read from disk, due to compression and internal buffer optimizations. archive_read_data_skip() A convenience function that repeatedly calls archive_read_data_block() to skip all of the data for this archive entry. Note that this function is invoked automatically by archive_read_next_header2() if the previous entry was not completely consumed. archive_read_data_into_fd() A convenience function that repeatedly calls archive_read_data_block() to copy the entire entry to the provided file descriptor. RETURN VALUES
Most functions return zero on success, non-zero on error. The possible return codes include: ARCHIVE_OK (the operation succeeded), ARCHIVE_WARN (the operation succeeded but a non-critical error was encountered), ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the operation failed but can be retried), and ARCHIVE_FATAL (there was a fatal error; the archive should be closed immediately). archive_read_data() returns a count of bytes actually read or zero at the end of the entry. On error, a value of ARCHIVE_FATAL, ARCHIVE_WARN, or ARCHIVE_RETRY is returned. ERRORS
Detailed error codes and textual descriptions are available from the archive_errno() and archive_error_string() functions. SEE ALSO
tar(1), libarchive(3), archive_read(3), archive_read_extract(3), archive_read_filter(3), archive_read_format(3), archive_read_header(3), archive_read_open(3), archive_read_set_options(3), archive_util(3), tar(5) BSD
February 2, 2012 BSD

Featured Tech Videos