Archive-Libarchive-XS
view release on metacpan or search on metacpan
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
OUTPUT:
RETVAL
#endif
=head2 archive_read_append_filter
my $status = archive_read_append_filter($archive, $code)
Add the given filter by its code.
The C<_append_> form is to manually set the format and filters to be used. This is useful
to bypass the bidding process when the format and filters to use is known in advance.
=cut
#if HAS_archive_read_append_filter
int
archive_read_append_filter(archive, code)
struct archive *archive
int code
#endif
=head2 archive_read_support_format_all
my $status = archive_read_support_format_all($archive);
Enable all available archive formats.
=cut
int
archive_read_support_format_all(archive)
struct archive *archive;
=head2 archive_read_support_format_by_code
my $status = archive_read_support_format_by_code($archive, $code);
Enables a single format specified by the format code.
=cut
#if HAS_archive_read_support_format_by_code
int
archive_read_support_format_by_code(archive, code)
struct archive *archive;
int code;
#endif
=head2 archive_read_open_filename
my $status = archive_read_open_filename($archive, $filename, $block_size);
Like C<archive_read_open>, except that it accepts a simple filename
and a block size. This function is safe for use with tape drives
or other blocked devices.
If you pass in C<undef> as the C<$filename>, libarchive will use
standard in as the input archive.
=cut
int
_archive_read_open_filename(archive, filename, block_size)
struct archive *archive;
string_or_null filename;
size_t block_size;
CODE:
RETVAL = archive_read_open_filename(archive, filename, block_size);
OUTPUT:
RETVAL
=head2 archive_read_open_memory
my $status = archive_read_open_memory($archive, $buffer);
Like C<archive_read_open>, except that it uses a Perl scalar that holds the
content of the archive. This function does not make a copy of the data stored
in C<$buffer>, so you should not modify the buffer until you have free the
archive using C<archive_read_free>.
Bad things will happen if the buffer falls out of scope and is deallocated
before you free the archive, so make sure that there is a reference to the
buffer somewhere in your programmer until C<archive_read_free> is called.
=cut
int
archive_read_open_memory(archive, input)
struct archive *archive;
SV *input;
CODE:
void *buff = NULL;
size_t size = 0;
buff = SvPV(input, size);
RETVAL = archive_read_open_memory(archive, buff, size);
OUTPUT:
RETVAL
=head2 archive_read_next_header
my $status = archive_read_next_header($archive, $entry);
Read the header for the next entry and return an entry object
Returns an opaque archive which may be a perl style object, or a C pointer
(depending on the implementation), either way, it can be passed into
any of the functions documented here with an <$entry> argument.
=cut
int
archive_read_next_header(archive, output)
struct archive *archive;
SV *output;
CODE:
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=head2 archive_write_free
my $status = archive_write_free($archive);
Invokes C<archive_write_close> if it was not invoked manually, then
release all resources.
=cut
int
_archive_write_free(archive)
struct archive *archive
CODE:
RETVAL = archive_write_free(archive);
OUTPUT:
RETVAL
=head2 archive_write_add_filter
my $status = archive_write_add_filter($archive, $code);
A convenience function to set the filter based on the code.
=cut
#if HAS_archive_write_add_filter
int
archive_write_add_filter(archive, code)
struct archive *archive
int code
#endif
=head2 archive_write_add_filter_by_name
my $status = archive_write_add_filter_by_name($archive, $name);
A convenience function to set the filter based on the name.
=cut
#if HAS_archive_write_add_filter_by_name
int
_archive_write_add_filter_by_name(archive, name)
struct archive *archive
const char *name
CODE:
RETVAL = archive_write_add_filter_by_name(archive, name);
OUTPUT:
RETVAL
#endif
=head2 archive_write_add_filter_program
my $status = archive_write_add_filter_program($archive, $cmd);
The archive will be fed into the specified compression program.
The output of that program is blocked and written to the client
write callbacks.
=cut
#if HAS_archive_write_add_filter_program
int
_archive_write_add_filter_program(archive, cmd)
struct archive *archive
const char *cmd
CODE:
RETVAL = archive_write_add_filter_program(archive, cmd);
OUTPUT:
RETVAL
#endif
=head2 archive_write_set_format
my $status = archive_write_set_format($archive, $code);
A convenience function to set the format based on the code.
=cut
int
archive_write_set_format(archive, code)
struct archive *archive
int code
=head2 archive_write_set_format_by_name
my $status = archive_write_set_format_by_name($archive, $name);
A convenience function to set the format based on the name.
=cut
int
_archive_write_set_format_by_name(archive, name)
struct archive *archive
const char *name
CODE:
RETVAL = archive_write_set_format_by_name(archive, name);
OUTPUT:
RETVAL
=head2 archive_write_open_filename
my $status = archive_write_open_filename($archive, $filename);
A convenience form of C<archive_write_open> that accepts a filename. If you have
not invoked C<archive_write_set_bytes_in_last_block>, then
C<archive_write_open_filename> will adjust the last-block padding depending on the
file: it will enable padding when writing to standard output or to a character or
block device node, it will disable padding otherwise. You can override this by
manually invoking C<archive_write_set_bytes_in_last_block> before C<calling
archive_write_open>. The C<archive_write_open_filename> function is safe for use
with tape drives or other block-oriented devices.
( run in 1.218 second using v1.01-cache-2.11-cpan-ad19def0cd9 )