view release on metacpan or search on metacpan
inc/path.xs.template view on Meta::CPAN
RETVAL = ARCHIVE_OK;
#ifdef HAS_archive_entry_update_<%= $name %>_utf8
}
}
else
{
archive_entry_copy_<%= $name %>(entry, NULL);
RETVAL = ARCHIVE_OK;
}
#endif
OUTPUT:
RETVAL
#endif
=head2 archive_entry_<%= $name %>
my $string = archive_entry_<%= $name %>($entry);
Retrieve the <%= $name %> for the archive entry object.
=cut
#ifdef HAS_archive_entry_<%= $name %>
string_or_null
_archive_entry_<%= $name %>(entry)
struct archive_entry *entry
CODE:
RETVAL = archive_entry_<%= $name %>(entry);
OUTPUT:
RETVAL
#endif
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
myopen(struct archive *archive, void *client_data)
{
int count;
int status;
dSP;
ENTER;
SAVETMPS;
PUSHMARK(SP);
XPUSHs(sv_2mortal(newSViv(PTR2IV((void*)archive))));
PUTBACK;
count = call_pv("Archive::Libarchive::XS::_myopen", G_SCALAR);
SPAGAIN;
status = POPi;
PUTBACK;
FREETMPS;
LEAVE;
return status;
}
static __LA_INT64_T
myread(struct archive *archive, void *client_data, const void **buffer)
{
int count;
__LA_INT64_T status;
STRLEN len;
SV *sv_buffer;
dSP;
ENTER;
SAVETMPS;
PUSHMARK(SP);
XPUSHs(sv_2mortal(newSViv(PTR2IV((void*)archive))));
PUTBACK;
count = call_pv("Archive::Libarchive::XS::_myread", G_ARRAY);
SPAGAIN;
sv_buffer = SvRV(POPs);
status = SvI64(POPs);
if(status == ARCHIVE_OK)
{
*buffer = (void*) SvPV(sv_buffer, len);
}
PUTBACK;
FREETMPS;
LEAVE;
if(status == ARCHIVE_OK)
return len == 1 ? 0 : len;
else
return status;
}
static __LA_INT64_T
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
{
int count;
__LA_INT64_T status;
dSP;
ENTER;
SAVETMPS;
PUSHMARK(SP);
XPUSHs(sv_2mortal(newSViv(PTR2IV((void*)archive))));
XPUSHs(sv_2mortal(newSVi64(request)));
PUTBACK;
count = call_pv("Archive::Libarchive::XS::_myskip", G_SCALAR);
SPAGAIN;
status = SvI64(POPs);
PUTBACK;
FREETMPS;
LEAVE;
return status;
}
static int
myclose(struct archive *archive, void *client_data)
{
int count;
int status;
dSP;
ENTER;
SAVETMPS;
PUSHMARK(SP);
XPUSHs(sv_2mortal(newSViv(PTR2IV((void*)archive))));
PUTBACK;
count = call_pv("Archive::Libarchive::XS::_myclose", G_SCALAR);
SPAGAIN;
status = POPi;
PUTBACK;
FREETMPS;
LEAVE;
return status;
}
static __LA_INT64_T
myseek(struct archive *archive, void *client_data, __LA_INT64_T offset, int whence)
{
int count;
__LA_INT64_T status;
dSP;
ENTER;
SAVETMPS;
PUSHMARK(SP);
XPUSHs(sv_2mortal(newSViv(PTR2IV((void*)archive))));
XPUSHs(sv_2mortal(newSVi64(offset)));
XPUSHs(sv_2mortal(newSViv(whence)));
PUTBACK;
count = call_pv("Archive::Libarchive::XS::_myskip", G_SCALAR);
SPAGAIN;
status = SvI64(POPs);
PUTBACK;
FREETMPS;
LEAVE;
return status;
}
static __LA_INT64_T
mywrite(struct archive *archive, void *client_data, const void *buffer, size_t length)
{
int count;
__LA_INT64_T status;
dSP;
ENTER;
SAVETMPS;
PUSHMARK(SP);
XPUSHs(sv_2mortal(newSViv(PTR2IV((void*)archive))));
XPUSHs(sv_2mortal(newSVpvn(buffer, length)));
PUTBACK;
count = call_pv("Archive::Libarchive::XS::_mywrite", G_SCALAR);
SPAGAIN;
status = SvI64(POPs);
PUTBACK;
FREETMPS;
LEAVE;
return status;
}
struct lookup_callback_data {
SV *perl_data, *lookup_callback, *cleanup_callback;
char *value;
};
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
dSP;
ENTER;
SAVETMPS;
PUSHMARK(SP);
if(data->perl_data == NULL)
XPUSHs(&PL_sv_undef);
else
XPUSHs(data->perl_data);
XPUSHs(sv_2mortal(newSVpv(name, 0)));
XPUSHs(sv_2mortal(newSVi64(id)));
PUTBACK;
count = call_sv(data->lookup_callback, G_SCALAR);
SPAGAIN;
if(count >= 1)
value = SvI64(POPs);
PUTBACK;
FREETMPS;
LEAVE;
return value;
}
else
{
return id;
}
}
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
{
dSP;
ENTER;
SAVETMPS;
PUSHMARK(SP);
if(data->perl_data == NULL)
XPUSHs(&PL_sv_undef);
else
XPUSHs(data->perl_data);
XPUSHs(sv_2mortal(newSVi64(id)));
PUTBACK;
count = call_sv(data->lookup_callback, G_SCALAR);
SPAGAIN;
if(count >= 1)
{
sv = POPs;
if(SvOK(sv))
{
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
Renew(data->value, len+1, char);
memcpy(data->value, tmp, len);
data->value[len] = 0;
}
else
{
count = 0;
}
}
PUTBACK;
FREETMPS;
LEAVE;
if(count >= 1)
return data->value;
}
return NULL;
}
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
if(data->cleanup_callback != NULL)
{
dSP;
ENTER;
SAVETMPS;
PUSHMARK(SP);
if(data->perl_data == NULL)
XPUSHs(&PL_sv_undef);
else
XPUSHs(data->perl_data);
PUTBACK;
call_sv(data->cleanup_callback, G_DISCARD|G_VOID);
}
if(data->perl_data != NULL)
SvREFCNT_dec(data->perl_data);
if(data->lookup_callback != NULL)
SvREFCNT_dec(data->lookup_callback);
if(data->cleanup_callback != NULL)
SvREFCNT_dec(data->cleanup_callback);
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
archive_write_disk_set_group_lookup(archive, data, lookup_callback, cleanup_callback)
struct archive *archive
SV *data
SV *lookup_callback
SV *cleanup_callback
CODE:
if(SvOK(cleanup_callback) || SvOK(lookup_callback))
RETVAL = archive_write_disk_set_group_lookup(archive, new_lookup_callback(data,lookup_callback,cleanup_callback), &mylookup_write_lookup, &mylookup_cleanup);
else
RETVAL = archive_write_disk_set_group_lookup(archive, NULL, NULL, NULL);
OUTPUT:
RETVAL
#endif
=head2 archive_read_disk_set_gname_lookup
my $status = archive_read_disk_set_gname_lookup($archive, $data, $lookup_callback, $cleanup_callback);
Register a callback for the lookup of GID from group names. In order to deregister call
C<archive_read_disk_set_gname_lookup> with both callback functions set to C<undef>.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
archive_read_disk_set_gname_lookup(archive, data, lookup_callback, cleanup_callback)
struct archive *archive
SV *data
SV *lookup_callback
SV *cleanup_callback
CODE:
if(SvOK(cleanup_callback) || SvOK(lookup_callback))
RETVAL = archive_read_disk_set_gname_lookup(archive, new_lookup_callback(data,lookup_callback,cleanup_callback), &mylookup_read_lookup, &mylookup_cleanup);
else
RETVAL = archive_read_disk_set_gname_lookup(archive, NULL, NULL, NULL);
OUTPUT:
RETVAL
#endif
=head2 archive_read_disk_set_uname_lookup
my $status = archive_read_disk_set_uname_lookup($archive, $data, $lookup_callback, $cleanup_callback);
Register a callback for the lookup of UID from user names. In order to deregister call
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
archive_read_disk_set_uname_lookup(archive, data, lookup_callback, cleanup_callback)
struct archive *archive
SV *data
SV *lookup_callback
SV *cleanup_callback
CODE:
if(SvOK(cleanup_callback) || SvOK(lookup_callback))
RETVAL = archive_read_disk_set_uname_lookup(archive, new_lookup_callback(data,lookup_callback,cleanup_callback), &mylookup_read_lookup, &mylookup_cleanup);
else
RETVAL = archive_read_disk_set_uname_lookup(archive, NULL, NULL, NULL);
OUTPUT:
RETVAL
#endif
=head2 archive_write_disk_set_user_lookup
my $status = archive_write_disk_set_user_lookup($archive, $data, $lookup_callback, $cleanup_callback);
Register a callback for the lookup of user names from user id numbers. In order to deregister
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
archive_write_disk_set_user_lookup(archive, data, lookup_callback, cleanup_callback)
struct archive *archive
SV *data
SV *lookup_callback
SV *cleanup_callback
CODE:
if(SvOK(cleanup_callback) || SvOK(lookup_callback))
RETVAL = archive_write_disk_set_user_lookup(archive, new_lookup_callback(data,lookup_callback,cleanup_callback), &mylookup_write_lookup, &mylookup_cleanup);
else
RETVAL = archive_write_disk_set_user_lookup(archive, NULL, NULL, NULL);
OUTPUT:
RETVAL
#endif
=head2 archive_entry_stat
my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $atime, $mtime, $ctime) = archive_entry_stat($entry);
Converts the various fields stored in the archive entry to the format used by L<stat|perlfunc#stat>.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
Invokes L<#archive_read_close> if it was not invoked manually, then
release all resources.
=cut
int
_archive_read_free(archive)
struct archive *archive;
CODE:
RETVAL = archive_read_free(archive);
OUTPUT:
RETVAL
=head2 archive_error_string
my $string = archive_error_string($archive);
Returns a textual error message suitable for display. The error
message here is usually more specific than that obtained from
passing the result of C<archive_errno> to C<strerror>.
Returns C<undef> if there is not error.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
CODE:
#if ARCHIVE_VERSION_NUMBER < 3000000
const char *str = archive_error_string(archive);
if(strcmp(str, "(Empty error message)"))
RETVAL = str;
else
RETVAL = NULL;
#else
RETVAL = archive_error_string(archive);
#endif
OUTPUT:
RETVAL
=head2 archive_errno
my $errno = archive_errno($archive);
Returns a numeric error code indicating the reason for the most
recent error return.
Return type is an errno integer value.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
generally used in client code. Does not return a value.
=cut
int
archive_clear_error(archive)
struct archive *archive;
CODE:
archive_clear_error(archive);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
=head2 archive_copy_error
my $status = archive_copy_error($archive1, $archive2);
Copies error information from one archive to another.
=cut
int
archive_copy_error(archive1, archive2)
struct archive *archive1;
struct archive *archive2;
CODE:
archive_copy_error(archive1, archive2);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
=head2 archive_filter_code
my $code = archive_filter_code($archive, $level);
Returns a numeric code identifying the indicated filter. See L<#archive_filter_count>
for details of the level numbering.
=cut
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_filter_name
const char *
_archive_filter_name(archive, level)
struct archive *archive;
int level;
CODE:
RETVAL = archive_filter_name(archive, level);
OUTPUT:
RETVAL
#endif
=head2 archive_format
my $code = archive_format($archive);
Returns a numeric code indicating the format of the current archive
entry. This value is set by a successful call to
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
A textual description of the format of the current entry.
=cut
const char *
_archive_format_name(archive)
struct archive *archive
CODE:
RETVAL = archive_format_name(archive);
OUTPUT:
RETVAL
=head2 archive_read_support_filter_all
my $status = archive_read_support_filter_all($archive);
Enable all available decompression filters.
=cut
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_read_support_filter_program
int
_archive_read_support_filter_program(archive, command)
struct archive *archive
const char *command
CODE:
RETVAL = archive_read_support_filter_program(archive, command);
OUTPUT:
RETVAL
#endif
=head2 archive_read_append_filter_program
my $status = archive_read_append_filter_program($archive, $command);
Data is feed through the specified external program before being
dearchived. Note that this disables automatic detection of the
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_read_append_filter_program
int
_archive_read_append_filter_program(archive, command)
struct archive *archive
const char *command
CODE:
RETVAL = archive_read_append_filter_program(archive, command);
OUTPUT:
RETVAL
#endif
=head2 archive_read_support_filter_program_signature
my $status = archive_read_support_filter_program_signature($archive, $command, $signature);
Data is feed through the specified external program before being
dearchived, if the signature matches.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
int
_archive_read_support_filter_program_signature(archive, command, signature)
struct archive *archive
const char *command
SV *signature
CODE:
void *ptr;
STRLEN size;
ptr = SvPV(signature, size);
RETVAL = archive_read_support_filter_program_signature(archive, command, ptr, size);
OUTPUT:
RETVAL
#endif
=head2 archive_read_append_filter_program_signature
my $status = archive_read_append_filter_program_signature($archive, $command, $signature);
Data is feed through the specified external program before being dearchived, if the signature
matches.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
int
_archive_read_append_filter_program_signature(archive, command, signature)
struct archive *archive
const char *command
SV *signature
CODE:
void *ptr;
STRLEN size;
ptr = SvPV(signature, size);
RETVAL = archive_read_append_filter_program_signature(archive, command, ptr, size);
OUTPUT:
RETVAL
#endif
=head2 archive_read_append_filter
my $status = archive_read_append_filter($archive, $code)
Add the given filter by its code.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=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>.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
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
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
int
archive_read_next_header(archive, output)
struct archive *archive;
SV *output;
CODE:
struct archive_entry *entry;
RETVAL = archive_read_next_header(archive, &entry);
sv_setiv(output, PTR2IV((void*)entry));
OUTPUT:
RETVAL
output
=head2 archive_read_data_skip
my $status = archive_read_data_skip($archive);
A convenience function that repeatedly calls C<archive_read_data> to skip
all of the data for this archive entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
Return the libarchive as a version.
Returns a string value.
=cut
const char *
_archive_version_string()
CODE:
RETVAL = archive_version_string();
OUTPUT:
RETVAL
=head2 archive_version_number
my $version = archive_version_number();
Return the libarchive version as an integer.
=cut
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
SV *buffer;
size_t max_size;
CODE:
if(!SvPOKp(buffer))
sv_setpv(buffer, "");
SvGROW(buffer, max_size);
void *ptr = SvPV_nolen(buffer);
int size = archive_read_data(archive, ptr, max_size);
SvCUR_set(buffer, size);
RETVAL = size;
OUTPUT:
RETVAL
buffer
=head2 archive_read_data_block
my $count_or_status = archive_read_data_block($archive, $buffer, $offset);
Return the next available block of data for this entry. Unlike
C<archive_read_data>, this function allows you to correctly
handle sparse files, as supported by some archive formats. The
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
CODE:
SV *tmp;
const void *buff = NULL;
size_t size = 0;
__LA_INT64_T offset = 0;
int r = archive_read_data_block(archive, &buff, &size, &offset);
sv_setpvn(sv_buff, buff, size);
tmp = sv_2mortal(newSVi64(offset));
sv_setsv(sv_offset, tmp);
RETVAL = r;
OUTPUT:
sv_buff
sv_offset
RETVAL
=head2 archive_write_data_block
my $count_or_status = archive_write_data_block($archive, $buffer, $offset);
Writes the buffer to the current entry in the given archive
starting at the given offset.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
size_t
archive_write_data_block(archive, sv_buff, offset)
struct archive *archive
SV *sv_buff
__LA_INT64_T offset
CODE:
void *buff = NULL;
size_t size;
buff = SvPV(sv_buff, size);
RETVAL = archive_write_data_block(archive, buff, size, offset);
OUTPUT:
RETVAL
=head2 archive_write_disk_new
my $archive = archive_write_disk_new();
Allocates and initializes a struct archive object suitable for
writing objects to disk.
Returns an opaque archive which may be a perl style object, or a C pointer
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
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
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=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
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=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.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
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
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
archive to standard out.
=cut
int
_archive_write_open_filename(archive, filename)
struct archive *archive
string_or_null filename;
CODE:
RETVAL = archive_write_open_filename(archive, filename);
OUTPUT:
RETVAL
=head2 archive_entry_clear
my $status = archive_entry_clear($entry);
Erases the object, resetting all internal fields to the same state as a newly-created object. This is provided
to allow you to quickly recycle objects without thrashing the heap.
=cut
int
archive_entry_clear(entry)
struct archive_entry *entry
CODE:
archive_entry_clear(entry);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
=head2 archive_entry_clone
my $entry1 = archive_entry_clone($entry2);
A deep copy operation; all text fields are duplicated.
=cut
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
Releases the struct archive_entry object.
=cut
int
archive_entry_free(entry)
struct archive_entry *entry
CODE:
archive_entry_free(entry);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
=head2 archive_entry_new
my $entry = archive_entry_new();
Allocate and return a blank struct archive_entry object.
=cut
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
int
archive_entry_set_size(entry, size)
struct archive_entry *entry
__LA_INT64_T size
CODE:
archive_entry_set_size(entry, size);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
=head2 archive_entry_unset_size
my $status = archive_entry_unset_size($entry);
Unsets the size property for the archive entry.
=cut
#if HAS_archive_entry_unset_size
int
archive_entry_unset_size(entry)
struct archive_entry *entry
CODE:
archive_entry_unset_size(entry);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_size_is_set
my $bool = archive_entry_size_is_set($entry)
Returns true if the size property for the archive entry has been set.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
int
archive_entry_set_filetype(entry, code)
struct archive_entry *entry
unsigned int code
CODE:
archive_entry_set_filetype(entry, code);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
=head2 archive_entry_filetype
my $code = archive_entry_filetype($entry);
Gets the filetype of the archive entry. Code should be one of
=over 4
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_perm
int
archive_entry_set_perm(entry, perm)
struct archive_entry *entry
int perm
CODE:
archive_entry_set_perm(entry, perm);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_perm
my $perm = archive_entry_perm($entry);
Get the permission bits for the entry. This is the usual UNIX octal permission thing.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
int
archive_write_data(archive, input)
struct archive *archive
SV *input
CODE:
void *buff = NULL;
size_t size = 0;
buff = SvPV(input, size);
RETVAL = archive_write_data(archive, buff, size);
OUTPUT:
RETVAL
=head2 archive_write_close
my $status = archive_write_close($archive)
Complete the archive and invoke the close callback.
=cut
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_mtime
int
archive_entry_set_mtime(entry, sec, nanosec)
struct archive_entry *entry
time_t sec
long nanosec
CODE:
archive_entry_set_mtime(entry, sec, nanosec);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_unset_mtime
my $status = archive_entry_unset_mtime($entry);
Unset the mtime (modify time) for the entry object.
=cut
#if HAS_archive_entry_unset_mtime
int
archive_entry_unset_mtime(entry)
struct archive_entry *entry
CODE:
archive_entry_unset_mtime(entry);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_write_finish_entry
my $status = archive_write_finish_entry($archive)
Close out the entry just written. Ordinarily,
clients never need to call this, as it is called
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_write_set_format_option
int
_archive_write_set_format_option(archive, module, option, value)
struct archive *archive
string_or_null module
string_or_null option
string_or_null value
CODE:
RETVAL = archive_write_set_format_option(archive, module, option, value);
OUTPUT:
RETVAL
#endif
=head2 archive_write_set_filter_option($archive, $module, $option, $value)
my $status = archive_write_set_filter_option($archive, $module, $option, $value);
Specifies an option that will be passed to currently-registered filters
(including decompression filters).
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_write_set_filter_option
int
_archive_write_set_filter_option(archive, module, option, value)
struct archive *archive
string_or_null module
string_or_null option
string_or_null value
CODE:
RETVAL = archive_write_set_filter_option(archive, module, option, value);
OUTPUT:
RETVAL
#endif
=head2 archive_write_set_option
my $status = archive_write_set_option($archive, $module, $option, $value);
Calls C<archive_write_set_format_option>, then
C<archive_write_set_filter_option>. If either function returns
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_write_set_option
int
_archive_write_set_option(archive, module, option, value)
struct archive *archive
string_or_null module
string_or_null option
string_or_null value
CODE:
RETVAL = archive_write_set_option(archive, module, option, value);
OUTPUT:
RETVAL
#endif
=head2 archive_write_set_options
my $status = archive_write_set_options($archive, $options);
options is a comma-separated list of options. If options is C<undef> or
empty, C<ARCHIVE_OK> will be returned immediately.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_write_set_options
int
_archive_write_set_options(archive, options)
struct archive *archive
string_or_null options
CODE:
RETVAL = archive_write_set_options(archive, options);
OUTPUT:
RETVAL
#endif
=head2 archive_write_set_bytes_per_block
my $status = archive_write_set_bytes_per_block($archive, $bytes_per_block);
Sets the block size used for writing the archive data. Every call to
the write callback function, except possibly the last one, will use this
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_write_disk_uid
__LA_INT64_T
_archive_write_disk_uid(archive, a2, a3)
struct archive *archive
const char *a2
__LA_INT64_T a3
CODE:
RETVAL = archive_write_disk_uid(archive, a2, a3);
OUTPUT:
RETVAL
#endif
=head2 archive_write_disk_gid
my $int64 = archive_write_disk_gid($archive, $string, $int64);
Undocumented libarchive function.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_write_disk_gid
__LA_INT64_T
_archive_write_disk_gid(archive, a2, a3)
struct archive *archive
const char *a2
__LA_INT64_T a3
CODE:
RETVAL = archive_write_disk_gid(archive, a2, a3);
OUTPUT:
RETVAL
#endif
=head2 archive_write_disk_set_skip_file
my $status = archive_write_disk_set_skip_file($archive, $device, $inode);
Records the device and inode numbers of a file that should not be
overwritten. This is typically used to ensure that an extraction
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_read_set_format_option
int
_archive_read_set_format_option(archive, module, options, value)
struct archive *archive
string_or_null module
string_or_null options
string_or_null value
CODE:
RETVAL = archive_read_set_format_option(archive, module, options, value);
OUTPUT:
RETVAL
#endif
=head2 archive_read_set_filter_option
my $status = archive_read_set_filter_option($archive, $module, $option, $value);
Specifies an option that will be passed to currently-registered filters
(including decompression filters).
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_read_set_filter_option
int
_archive_read_set_filter_option(archive, module, option, value)
struct archive *archive
string_or_null module
string_or_null option
string_or_null value
CODE:
RETVAL = archive_read_set_filter_option(archive, module, option, value);
OUTPUT:
RETVAL
#endif
=head2 archive_read_set_option
my $status = archive_read_set_option($archive, $module, $option, $value);
Calls C<archive_read_set_format_option> then
C<archive_read_set_filter_option>. If either function returns
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_read_set_option
int
_archive_read_set_option(archive, module, option, value)
struct archive *archive
string_or_null module
string_or_null option
string_or_null value
CODE:
RETVAL = archive_read_set_option(archive, module, option, value);
OUTPUT:
RETVAL
#endif
=head2 archive_read_set_options
my $status = archive_read_set_options($archive, $options);
options is a comma-separated list of options. If options is C<undef> or
empty, C<ARCHIVE_OK> will be returned immediately.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_read_set_options
int
_archive_read_set_options(archive, options)
struct archive *archive
string_or_null options
CODE:
RETVAL = archive_read_set_options(archive, options);
OUTPUT:
RETVAL
#endif
=head2 archive_read_set_format
my $status = archive_read_set_format($archive, $format);
Undocumented libarchive function.
=cut
#if HAS_archive_read_set_format
int
_archive_read_set_format(archive, format)
struct archive *archive
int format
CODE:
RETVAL = archive_read_set_format(archive, format);
OUTPUT:
RETVAL
#endif
=head2 archive_read_header_position
my $offset = archive_read_header_position($archive);
Retrieve the byte offset in UNCOMPRESSED data where last-read
header started.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
SV *read_cb
SV *close_cb
CODE:
RETVAL = archive_read_open(
archive,
NULL,
SvOK(open_cb) ? myopen : NULL,
SvOK(read_cb) ? myread : NULL,
SvOK(close_cb) ? myclose : NULL
);
OUTPUT:
RETVAL
#endif
=head2 archive_write_open
my $status = archive_write_open($archive, $data, $open_cb, $read_cb, $close_cb);
Freeze the settings, open the archive, and prepare for writing entries. This is the most
generic form of this function, which accepts pointers to three callback functions which will
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
SV *write_cb
SV *close_cb
CODE:
RETVAL = archive_write_open(
archive,
NULL,
SvOK(open_cb) ? myopen : NULL,
SvOK(write_cb) ? mywrite : NULL,
SvOK(close_cb) ? myclose : NULL
);
OUTPUT:
RETVAL
#endif
=head2 archive_read_open2
my $status = archive_read_open2($archive, $data, $open_cb, $read_cb, $skip_cb, $close_cb);
Freeze the settings, open the archive, and prepare for reading entries. This is the most
generic version of this call, which accepts four callback functions. Most clients will
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
SV *close_cb
CODE:
RETVAL = archive_read_open2(
archive,
NULL,
SvOK(open_cb) ? myopen : NULL,
SvOK(read_cb) ? myread : NULL,
SvOK(skip_cb) ? myskip : NULL,
SvOK(close_cb) ? myclose : NULL
);
OUTPUT:
RETVAL
#endif
=head2 archive_read_set_open_callback($archive, $callback)
my $status = archive_read_set_open_callback($archive, $callback);
Set the open callback for the archive object.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
int
_archive_read_set_open_callback(archive, callback)
struct archive *archive
SV *callback
CODE:
RETVAL = archive_read_set_open_callback(
archive,
SvOK(callback) ? myopen : NULL
);
OUTPUT:
RETVAL
#endif
=head2 archive_read_set_read_callback
my $status = archive_read_set_read_callback($archive, $callback);
Set the read callback for the archive object.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
int
_archive_read_set_read_callback(archive, callback)
struct archive *archive
SV *callback
CODE:
RETVAL = archive_read_set_read_callback(
archive,
SvOK(callback) ? myread : NULL
);
OUTPUT:
RETVAL
#endif
=head2 archive_read_set_skip_callback
my $status = archive_read_set_skip_callback($archive, $callback);
Set the skip callback for the archive object.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
int
_archive_read_set_skip_callback(archive, callback)
struct archive *archive
SV *callback
CODE:
RETVAL = archive_read_set_skip_callback(
archive,
SvOK(callback) ? myskip : NULL
);
OUTPUT:
RETVAL
#endif
=head2 archive_read_set_close_callback
my $status = archive_read_set_close_callback($archive, $callback);
Set the close callback for the archive object.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
int
_archive_read_set_close_callback(archive, callback)
struct archive *archive
SV *callback
CODE:
RETVAL = archive_read_set_close_callback(
archive,
SvOK(callback) ? myclose : NULL
);
OUTPUT:
RETVAL
#endif
=head2 archive_read_set_seek_callback
my $status = archive_read_set_seek_callback($archive, $callback);
Set the seek callback for the archive object.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
int
_archive_read_set_seek_callback(archive, callback)
struct archive *archive
SV *callback
CODE:
RETVAL = archive_read_set_seek_callback(
archive,
SvOK(callback) ? myseek : NULL
);
OUTPUT:
RETVAL
#endif
=head2 archive_read_set_callback_data
my $status = archive_read_set_callback_data($archive, $data);
Set the client data for callbacks.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
int
_archive_read_set_callback_data(archive, data)
struct archive *archive
void *data
CODE:
/*
* note: this isn't actually used as it is implemented
* at the Perl level
*/
RETVAL = archive_read_set_callback_data(archive, data);
OUTPUT:
RETVAL
#endif
=head2 archive_read_open1
my $status = archive_read_open1($archive);
Opening freezes the callbacks.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_entry_unset_atime
int
archive_entry_unset_atime(entry)
struct archive_entry *entry
CODE:
archive_entry_unset_atime(entry);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_atime
my $atime = archive_entry_atime($entry);
Returns the access time property for the archive entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_atime
int
archive_entry_set_atime(entry, atime, nsec)
struct archive_entry *entry
time_t atime
long nsec
CODE:
archive_entry_set_atime(entry, atime, nsec);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_set_birthtime
my $status = archive_entry_set_birthtime($entry, $birthtime, $nsec);
Sets the birthtime (creation time) for the archive entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_birthtime
int
archive_entry_set_birthtime(entry, birthtime, nsec)
struct archive_entry *entry
time_t birthtime
long nsec
CODE:
archive_entry_set_birthtime(entry, birthtime, nsec);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_atime_nsec
my $atime = archive_entry_atime_nsec($entry);
Returns the access time (nanoseconds).
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_entry_unset_birthtime
int
archive_entry_unset_birthtime(entry)
struct archive_entry *entry
CODE:
archive_entry_unset_birthtime(entry);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_birthtime
my $birthtime = archive_entry_birthtime($entry);
Returns the birthtime (creation time) for the archive entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_ctime
int
archive_entry_set_ctime(entry, ctime, nsec)
struct archive_entry *entry
time_t ctime
long nsec
CODE:
archive_entry_set_ctime(entry, ctime, nsec);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_unset_ctime
my $status = archive_entry_set_ctime($entry);
Unsets the ctime (last time an inode property was changed) property for the archive entry.
=cut
#if HAS_archive_entry_unset_ctime
int
archive_entry_unset_ctime(entry)
struct archive_entry *entry
CODE:
archive_entry_unset_ctime(entry);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_mtime
my $mtime = archive_entry_mtime($entry);
Gets the mtime (modify time) property for the archive entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
CODE:
SV *tmp;
unsigned long set;
unsigned long clear;
archive_entry_fflags(entry, &set, &clear);
tmp = sv_2mortal(newSVuv(set));
sv_setsv(sv_set, tmp);
tmp = sv_2mortal(newSVuv(clear));
sv_setsv(sv_clear, tmp);
RETVAL = ARCHIVE_OK;
OUTPUT:
sv_set
sv_clear
RETVAL
#endif
=head2 archive_entry_set_fflags
my $status = archive_entry_set_fflags($entry, $set, $clear);
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_fflags
int
archive_entry_set_fflags(entry, set, clear)
struct archive_entry *entry
unsigned long set
unsigned long clear
CODE:
archive_entry_set_fflags(entry, set, clear);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_dev
my $device = archive_entry_dev($entry);
Returns the device property for the archive entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_entry_fflags_text
const char *
_archive_entry_fflags_text(entry)
struct archive_entry *entry
CODE:
RETVAL = archive_entry_fflags_text(entry);
OUTPUT:
RETVAL
#endif
=head2 archive_entry_copy_fflags_text
my $status = archive_entry_copy_fflags_text($entry, $string);
Sets the fflags_text property for the archive entry object.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_copy_fflags_text
int
_archive_entry_set_fflags_text(entry, string)
struct archive_entry *entry
string_or_null string
CODE:
archive_entry_copy_fflags_text(entry, string);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_gid
my $gid = archive_entry_gid($entry);
Returns the group id property for the archive entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_gid
int
archive_entry_set_gid(entry, gid)
struct archive_entry *entry
__LA_INT64_T gid
CODE:
archive_entry_set_gid(entry, gid);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_read_disk_descend
my $status = archive_read_disk_descend($archive);
Request that current entry be visited. If you invoke it on every
directory, you'll get a physical traversal. This is ignored if the
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_read_disk_open
int
_archive_read_disk_open(archive, name)
struct archive *archive
const char *name
CODE:
RETVAL = archive_read_disk_open(archive, name);
OUTPUT:
RETVAL
#endif
=head2 archive_read_disk_gname
my $string = archive_read_disk_gname($archive, $gid);
Returns a group name given a gid value. By default always
returns C<undef>.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_read_disk_gname
string_or_null
_archive_read_disk_gname(archive, gid)
struct archive *archive
__LA_INT64_T gid
CODE:
RETVAL = archive_read_disk_gname(archive, gid);
OUTPUT:
RETVAL
#endif
=head2 archive_read_disk_uname
my $string = archive_read_disk_uname($archive, $gid);
Returns a user name given a uid value. By default always
returns C<undef>.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_read_disk_uname
string_or_null
_archive_read_disk_uname(archive, gid)
struct archive *archive
__LA_INT64_T gid
CODE:
RETVAL = archive_read_disk_uname(archive, gid);
OUTPUT:
RETVAL
#endif
=head2 archive_read_disk_new
my $archive = archive_read_disk_new();
Allocates and initializes an archive object suitable for reading object information
from disk.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_entry_acl_clear
int
archive_entry_acl_clear(entry)
struct archive_entry *entry
CODE:
archive_entry_acl_clear(entry);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_acl_add_entry
my $status = archive_entry_acl_add_entry($entry, $type, $permset, $tag, $qual, $name);
Adds a single ACL entry. For the access ACL and non-extended principals, the classic
UNIX permissions are updated.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
int
_archive_entry_acl_add_entry(entry, type, permset, tag, qual, name)
struct archive_entry *entry
int type
int permset
int tag
int qual
const char *name
CODE:
RETVAL = archive_entry_acl_add_entry(entry, type, permset, tag, qual, name);
OUTPUT:
RETVAL
#endif
=head2 archive_entry_acl_reset
my $status = archive_entry_acl_reset($entry, $want_type);
prepare reading the list of ACL entries with
L<#archive_entry_acl_next> or L<#archive_entry_acl_next_w>. The function returns
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
SV *name
CODE:
int a_type, a_permset, a_tag, a_qual;
const char *a_name;
RETVAL = archive_entry_acl_next(entry, want_type, &a_type, &a_permset, &a_tag, &a_qual, &a_name);
sv_setiv(type, a_type);
sv_setiv(permset, a_permset);
sv_setiv(tag, a_tag);
sv_setiv(qual, a_qual);
sv_setpv(name, a_name);
OUTPUT:
type
permset
tag
qual
name
#endif
=head2 archive_entry_acl_text
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_entry_acl_text
string_or_null
_archive_entry_acl_text(entry, flags)
struct archive_entry *entry
int flags
CODE:
RETVAL = archive_entry_acl_text(entry, flags);
OUTPUT:
RETVAL
#endif
=head2 archive_entry_acl_count
my $count = archive_entry_acl_count($entry, $want_type);
counts the ACL entries that have the given type mask.
$type can be the bitwise-or of C<ARCHIVE_ENTRY_ACL_TYPE_ACCESS> and
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_rdev
int
archive_entry_set_rdev(entry, device)
struct archive_entry *entry
dev_t device
CODE:
archive_entry_set_rdev(entry, device);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_set_rdevmajor
my $status = archive_entry_set_rdevmajor($entry, $major);
Set the major component of the rdev property for the archive entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_rdevmajor
int
archive_entry_set_rdevmajor(entry, major)
struct archive_entry *entry
dev_t major
CODE:
archive_entry_set_rdevmajor(entry, major);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_set_rdevminor
my $status = archive_entry_set_rdevminor($entry, $minor);
Sets the minor component of the rdev property for the archive entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_rdevminor
int
archive_entry_set_rdevminor(entry, minor)
struct archive_entry *entry
dev_t minor
CODE:
archive_entry_set_rdevminor(entry, minor);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_set_mac_metadata
my $status = archive_entry_set_mac_metadata($entry, $buffer);
The mac_metadata property is Storage for Mac OS-specific
AppleDouble metadata information. Apple-format tar files
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
int
archive_entry_set_mac_metadata(entry, buffer)
struct archive_entry *entry
SV *buffer
CODE:
STRLEN len;
const void *ptr = SvPV(buffer, len);
archive_entry_copy_mac_metadata(entry, ptr, len);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_mac_metadata
my $buffer = archive_entry_mac_metadata($entry);
The mac_metadata property is Storage for Mac OS-specific
AppleDouble metadata information. Apple-format tar files
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
SV *
archive_entry_mac_metadata(entry)
struct archive_entry *entry
CODE:
size_t size;
const void *ptr = archive_entry_mac_metadata(entry, &size);
if(ptr == NULL)
XSRETURN_EMPTY;
else
RETVAL = newSVpv(ptr, size);
OUTPUT:
RETVAL
#endif
=head2 archive_entry_mode
my $mode = archive_entry_mode($entry);
Get a combination of file type and permission and provide the equivalent of st_mode.
use of L<#archive_entry_filetype> and L<#archive_entry_perm> for getting and
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_mode
int
archive_entry_set_mode(entry, mode)
struct archive_entry *entry
int mode
CODE:
archive_entry_set_mode(entry, mode);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_read_open_filenames
my $status = archive_read_open_filenames($archive, \\@filenames, $block_size);
Use this for reading multivolume files by filenames.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
AV *av = (AV*) SvRV(filenames);
SV *filename = *av_fetch(av, i, 0);
c_filenames[i] = SvPV_nolen(filename);
/* printf(" i = %d s = %s\n", i, c_filenames[i]); */
}
c_filenames[num] = NULL;
/* printf(" i = %d s = NULL\n", num); */
RETVAL = archive_read_open_filenames(archive, c_filenames, block_size);
Safefree(c_filenames);
}
OUTPUT:
RETVAL
#endif
=head2 archive_entry_linkresolver_new
my $linkresolver = archive_entry_linkresolver_new();
Allocate a new link resolver.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_entry_linkresolver_free
int
archive_entry_linkresolver_free(linkresolver)
struct archive_entry_linkresolver* linkresolver
CODE:
archive_entry_linkresolver_free(linkresolver);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_linkresolver_set_strategy
my $status = archive_entry_linkresolver_set_strategy($linkresolver, $format);
Set the link resolver strategy. $format should be an archive format constant
(a constant with ARCHIVE_FORMAT_ prefix see L<Archive::Libarchive::XS::Constant>.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_linkresolver_set_strategy
int
archive_entry_linkresolver_set_strategy(linkresolver, format)
struct archive_entry_linkresolver* linkresolver
int format
CODE:
archive_entry_linkresolver_set_strategy(linkresolver, format);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_set_ino
my $status = archive_entry_set_ino($entry, $ino);
Set the inode property for the entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_ino
int
archive_entry_set_ino(entry, ino)
struct archive_entry *entry
__LA_INT64_T ino
CODE:
archive_entry_set_ino64(entry, ino);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_ino
my $ino = archive_entry_ino($entry);
Get the inode property for the entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_entry_ino
__LA_INT64_T
archive_entry_ino(entry)
struct archive_entry *entry
CODE:
RETVAL = archive_entry_ino64(entry);
OUTPUT:
RETVAL
#endif
=head2 archive_entry_ino_is_set
my $bool = archive_entry_ino_is_set($entry);
Returns true if the inode property for the entry has been set.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_dev
int
archive_entry_set_dev(entry, device)
struct archive_entry *entry
dev_t device
CODE:
archive_entry_set_dev(entry, device);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_set_devmajor
my $status = archive_entry_set_devmajor($entry, $devmajor);
Sets the device major property for the archive entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#ifdef HAS_archive_entry_set_devmajor
int
archive_entry_set_devmajor(entry, device)
struct archive_entry *entry
dev_t device
CODE:
archive_entry_set_devmajor(entry, device);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_set_devminor
my $status = archive_entry_set_devminor($entry, $devminor);
Sets the device minor property for the archive entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#ifdef HAS_archive_entry_set_devminor
int
archive_entry_set_devminor(entry, device)
struct archive_entry *entry
dev_t device
CODE:
archive_entry_set_devminor(entry, device);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_set_nlink
my $status = archive_entry_set_nlink($entry, $nlink);
Sets the number of hardlinks for the entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_nlink
int
archive_entry_set_nlink(entry, nlink)
struct archive_entry *entry
unsigned int nlink
CODE:
archive_entry_set_nlink(entry, nlink);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_nlink
my $nlink = archive_entry_nlink($entry);
Gets the number of hardlinks for the entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_linkify
int
archive_entry_linkify(linkresolver, entry1, entry2)
struct archive_entry_linkresolver *linkresolver
SV *entry1
SV *entry2
CODE:
struct archive_entry *e1=NULL,*e2=NULL;
/* INPUT */
if(SvOK(entry1))
e1 = INT2PTR(struct archive_entry *, SvIV(entry1));
if(SvOK(entry2))
e2 = INT2PTR(struct archive_entry *, SvIV(entry2));
/* CALL */
archive_entry_linkify(linkresolver, &e1, &e2);
/* OUTPUT */
if(e1 == NULL)
sv_setsv(entry1, &PL_sv_undef);
else
sv_setiv(entry1, PTR2IV(e1));
if(e2 == NULL)
sv_setsv(entry2, &PL_sv_undef);
else
sv_setiv(entry2, PTR2IV(e2));
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
entry1
entry2
#endif
=head2 archive_entry_uid
my $uid = archive_entry_uid($entry);
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_uid
int
archive_entry_set_uid(entry, uid)
struct archive_entry *entry
__LA_INT64_T uid
CODE:
archive_entry_set_uid(entry, uid);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_set_error
my $status = archive_set_error($archive, $errno, $format, @args);
Sets the numeric error code and error description that will be returned by
L<#archive_errno> and L<#archive_error_string>. This function should be
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_set_error
int
_archive_set_error(archive, status, string)
struct archive *archive
int status
const char *string
CODE:
archive_set_error(archive, status, "%s", string);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_strmode
my $strmode = archive_entry_strmode($entry);
Returns a string representation of the archive entry's permission mode,
a la the Unix C<ls> command (example: a mode of C<0644> should come back
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_read_extract_set_skip_file
int
archive_read_extract_set_skip_file(archive, dev, ino)
struct archive *archive
__LA_INT64_T dev
__LA_INT64_T ino
CODE:
archive_read_extract_set_skip_file(archive, dev, ino);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_read_extract
my $status = archive_read_extract($archive, $entry, $flags);
A convenience function that wraps the corresponding archive_write_disk interfaces. The first call to L<#archive_read_extract> creates a restore object using L<#archive_write_disk_new> and
L<#archive_write_disk_set_standard_lookup>, then transparently invokes L<#archive_write_disk_set_options>, L<#archive_write_header>, L<#archive_write_data>, and L<#archive_write_finish_entry> to
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
int
_archive_read_disk_entry_from_file(archive, entry, fd, stat)
struct archive *archive
struct archive_entry *entry
int fd
SV *stat
CODE:
if(SvOK(stat))
croak("stat field currently not supported");
RETVAL = archive_read_disk_entry_from_file(archive, entry, fd, NULL);
OUTPUT:
RETVAL
#endif
=head2 archive_match_include_uid
my $status = archive_match_include_uid($archive, $uid);
The match object $archive should match entries with the given $uid
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_match_include_uname
int
_archive_match_include_uname(archive, uname)
struct archive *archive
string_or_null uname
CODE:
RETVAL = archive_match_include_uname(archive, uname);
OUTPUT:
RETVAL
#endif
=head2 archive_match_include_gname
my $status = archive_match_include_gname($archive, $gname);
The match object $archive should match entries with the given group name
=cut
#if HAS_archive_match_include_gname
int
_archive_match_include_gname(archive, gname)
struct archive *archive
string_or_null gname
CODE:
RETVAL = archive_match_include_gname(archive, gname);
OUTPUT:
RETVAL
#endif
=head2 archive_entry_copy_sourcepath
my $status = archive_entry_set_sourcepath($entry, $sourcepath);
Sets the sourcepath property for the archive entry object.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_copy_sourcepath
int
_archive_entry_set_sourcepath(entry, sourcepath)
struct archive_entry *entry
const char *sourcepath
CODE:
archive_entry_copy_sourcepath(entry, sourcepath);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_sourcepath
my $sourcepath = archive_entry_sourcepath($entry);
Gets the sourcepath property for the archive entry object.
=cut
#if HAS_archive_entry_sourcepath
const char *
_archive_entry_sourcepath(entry)
struct archive_entry *entry
CODE:
RETVAL = archive_entry_sourcepath(entry);
OUTPUT:
RETVAL
#endif
=head2 archive_entry_set_link
my $status = archive_entry_set_link($entry, $string);
Set symlink if symlink is already set, else set hardlink.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_set_link
int
_archive_entry_set_link(entry, string)
struct archive_entry *entry
string_or_null string
CODE:
archive_entry_set_link(entry, string);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_xattr_add_entry
my $status = archive_entry_xattr_add_entry($entry, $name, $buffer);
Add an extended attribute (xattr) to the archive entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
archive_entry_xattr_add_entry(entry, name, buffer)
struct archive_entry *entry
const char *name
SV *buffer
CODE:
const void *ptr;
STRLEN size;
ptr = SvPV(buffer, size);
archive_entry_xattr_add_entry(entry, name, ptr, size);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_xattr_clear
my $status = archive_entry_xattr_clear($entry);
Remove all extended attributes (xattr) to the archive entry.
=cut
#if HAS_archive_entry_xattr_clear
int
archive_entry_xattr_clear(entry)
struct archive_entry *entry
CODE:
archive_entry_xattr_clear(entry);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_xattr_count
my $count = archive_entry_xattr_count($entry);
Returns the number of extended attributes (xattr) for the archive entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
struct archive_entry *entry
SV *name
SV *buffer
CODE:
const char *name_ptr;
const void *value_ptr;
size_t size;
RETVAL = archive_entry_xattr_next(entry, &name_ptr, &value_ptr, &size);
sv_setpv(name, name_ptr);
sv_setpvn(buffer, value_ptr, size);
OUTPUT:
RETVAL
name
buffer
#endif
=head2 archive_entry_sparse_clear
my $status = archive_entry_sparse_clear($entry)
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#if HAS_archive_entry_sparse_clear
int
archive_entry_sparse_clear(entry)
struct archive_entry *entry
CODE:
archive_entry_sparse_clear(entry);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_sparse_add_entry
my $status = archive_entry_sparse_add_entry($entry, $offset, $length)
Add a sparse region to the entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#if HAS_archive_entry_sparse_add_entry
int
archive_entry_sparse_add_entry(entry, offset, length)
struct archive_entry *entry
__LA_INT64_T offset
__LA_INT64_T length
CODE:
archive_entry_sparse_add_entry(entry, offset, length);
RETVAL = ARCHIVE_OK;
OUTPUT:
RETVAL
#endif
=head2 archive_entry_sparse_count
my $count = archive_entry_sparse_count($entry);
Return the number of sparse entries in the entry.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
SV *offset
SV *length
CODE:
__LA_INT64_T o, l;
SV *otmp, *ltmp;
RETVAL = archive_entry_sparse_next(entry, &o, &l);
otmp = sv_2mortal(newSVi64(o));
sv_setsv(offset, otmp);
ltmp = sv_2mortal(newSVi64(l));
sv_setsv(length, ltmp);
OUTPUT:
RETVAL
#endif
=head2 archive_match_exclude_entry
my $status = archive_match_exclude_entry($archive, $flag, $entry);
Add exclusion entry
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
=cut
#ifdef HAS_archive_match_exclude_pattern
int
_archive_match_exclude_pattern(archive, pattern)
struct archive *archive
const char *pattern
CODE:
RETVAL = archive_match_exclude_pattern(archive, pattern);
OUTPUT:
RETVAL
#endif
=head2 archive_match_exclude_pattern_from_file
my $status = archive_match_exclude_pattern_from_file($archive, $filename, $null_separator);
Add exclusion pathname pattern from file.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#ifdef HAS_archive_match_exclude_pattern_from_file
int
_archive_match_exclude_pattern_from_file(archive, filename, null_separator)
struct archive *archive
const char *filename
int null_separator
CODE:
RETVAL = archive_match_exclude_pattern_from_file(archive, filename, null_separator);
OUTPUT:
RETVAL
#endif
=head2 archive_match_include_date
my $status = archive_match_include_date($archive, $flag, $date_string);
Set inclusion time by a date string
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#ifdef HAS_archive_match_include_file_time
int
_archive_match_include_file_time(archive, flag, pathname)
struct archive *archive
int flag
const char *pathname
CODE:
RETVAL = archive_match_include_file_time(archive, flag, pathname);
OUTPUT:
RETVAL
#endif
=head2 archive_match_include_pattern
my $status = archive_match_include_pattern_from_file($archive, $pattern);
Add inclusion pathname pattern
=cut
#ifdef HAS_archive_match_include_pattern
int
_archive_match_include_pattern(archive, pattern)
struct archive *archive
const char *pattern
CODE:
RETVAL = archive_match_include_pattern(archive, pattern);
OUTPUT:
RETVAL
#endif
=head2 archive_match_include_pattern_from_file
my $status = archive_match_include_pattern_from_file($archive, $filename, $null_separator);
Add inclusion pathname pattern from file
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#ifdef HAS_archive_match_include_pattern_from_file
int
_archive_match_include_pattern_from_file(archive, filename, null_separator)
struct archive *archive
const char *filename
int null_separator
CODE:
RETVAL = archive_match_include_pattern_from_file(archive, filename, null_separator);
OUTPUT:
RETVAL
#endif
=head2 archive_match_include_time
my $status = archive_match_include_time($archive, $flag, $sec, $nsec);
Set inclusion time
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
#ifdef HAS_archive_match_path_unmatched_inclusions_next
int
archive_match_path_unmatched_inclusions_next(archive, pattern)
struct archive *archive
SV *pattern
CODE:
const char *tmp;
RETVAL = archive_match_path_unmatched_inclusions_next(archive, &tmp);
sv_setpv(pattern, tmp);
OUTPUT:
RETVAL
#endif
int
_constant(name)
char *name
CODE:
if(!strcmp(name, "ARCHIVE_OK"))
RETVAL = ARCHIVE_OK;
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
else if(!strcmp(name, "ARCHIVE_VERSION_STAMP"))
RETVAL = ARCHIVE_VERSION_STAMP;
#endif
#ifdef ARCHIVE_WARN
else if(!strcmp(name, "ARCHIVE_WARN"))
RETVAL = ARCHIVE_WARN;
#endif
/* CONSTANT AUTOGEN END */
else
Perl_croak(aTHX_ "No such constant");
OUTPUT:
RETVAL
/* PURE AUTOGEN BEGIN */
/* Do not edit anything below this line as it is autogenerated
and will be lost the next time you run dzil build */
=head2 archive_read_support_filter_bzip2
my $status = archive_read_support_filter_bzip2($archive);
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
RETVAL = ARCHIVE_OK;
#ifdef HAS_archive_entry_update_gname_utf8
}
}
else
{
archive_entry_copy_gname(entry, NULL);
RETVAL = ARCHIVE_OK;
}
#endif
OUTPUT:
RETVAL
#endif
=head2 archive_entry_gname
my $string = archive_entry_gname($entry);
Retrieve the gname for the archive entry object.
=cut
#ifdef HAS_archive_entry_gname
string_or_null
_archive_entry_gname(entry)
struct archive_entry *entry
CODE:
RETVAL = archive_entry_gname(entry);
OUTPUT:
RETVAL
#endif
=head2 archive_entry_set_hardlink
my $status = archive_entry_set_hardlink($entry, $string)
Sets the hardlink for the archive entry object.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
RETVAL = ARCHIVE_OK;
#ifdef HAS_archive_entry_update_hardlink_utf8
}
}
else
{
archive_entry_copy_hardlink(entry, NULL);
RETVAL = ARCHIVE_OK;
}
#endif
OUTPUT:
RETVAL
#endif
=head2 archive_entry_hardlink
my $string = archive_entry_hardlink($entry);
Retrieve the hardlink for the archive entry object.
=cut
#ifdef HAS_archive_entry_hardlink
string_or_null
_archive_entry_hardlink(entry)
struct archive_entry *entry
CODE:
RETVAL = archive_entry_hardlink(entry);
OUTPUT:
RETVAL
#endif
=head2 archive_entry_set_pathname
my $status = archive_entry_set_pathname($entry, $string)
Sets the pathname for the archive entry object.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
RETVAL = ARCHIVE_OK;
#ifdef HAS_archive_entry_update_pathname_utf8
}
}
else
{
archive_entry_copy_pathname(entry, NULL);
RETVAL = ARCHIVE_OK;
}
#endif
OUTPUT:
RETVAL
#endif
=head2 archive_entry_pathname
my $string = archive_entry_pathname($entry);
Retrieve the pathname for the archive entry object.
=cut
#ifdef HAS_archive_entry_pathname
string_or_null
_archive_entry_pathname(entry)
struct archive_entry *entry
CODE:
RETVAL = archive_entry_pathname(entry);
OUTPUT:
RETVAL
#endif
=head2 archive_entry_set_symlink
my $status = archive_entry_set_symlink($entry, $string)
Sets the symlink for the archive entry object.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
RETVAL = ARCHIVE_OK;
#ifdef HAS_archive_entry_update_symlink_utf8
}
}
else
{
archive_entry_copy_symlink(entry, NULL);
RETVAL = ARCHIVE_OK;
}
#endif
OUTPUT:
RETVAL
#endif
=head2 archive_entry_symlink
my $string = archive_entry_symlink($entry);
Retrieve the symlink for the archive entry object.
=cut
#ifdef HAS_archive_entry_symlink
string_or_null
_archive_entry_symlink(entry)
struct archive_entry *entry
CODE:
RETVAL = archive_entry_symlink(entry);
OUTPUT:
RETVAL
#endif
=head2 archive_entry_set_uname
my $status = archive_entry_set_uname($entry, $string)
Sets the uname for the archive entry object.
lib/Archive/Libarchive/XS.xs view on Meta::CPAN
RETVAL = ARCHIVE_OK;
#ifdef HAS_archive_entry_update_uname_utf8
}
}
else
{
archive_entry_copy_uname(entry, NULL);
RETVAL = ARCHIVE_OK;
}
#endif
OUTPUT:
RETVAL
#endif
=head2 archive_entry_uname
my $string = archive_entry_uname($entry);
Retrieve the uname for the archive entry object.
=cut
#ifdef HAS_archive_entry_uname
string_or_null
_archive_entry_uname(entry)
struct archive_entry *entry
CODE:
RETVAL = archive_entry_uname(entry);
OUTPUT:
RETVAL
#endif
struct archive * T_PTR
struct archive_entry * T_PTR
struct archive_entry_linkresolver * T_PTR
struct archive_acl * T_PTR
__LA_INT64_T T_INT64
string_or_null T_PV_OR_NULL
dev_t T_INT64
int64_t T_INT64
uint64_t T_UINT64
INPUT
T_PV_OR_NULL
$var = SvOK($arg) ? ($type)SvPV_nolen($arg) : NULL;
T_INT64
$var = SvI64($arg);
T_UINT64
$var = SvU64($arg);
OUTPUT
T_PV_OR_NULL
$var != NULL ? sv_setpv((SV*)$arg, $var) : sv_setsv((SV*)$arg, &PL_sv_undef);
T_INT64
$arg = newSVi64($var);
T_UINT64
$arg = newSVu64($var);
xs/ppport.h view on Meta::CPAN
PUSH_MULTICALL_FLAGS|5.018000||Viu
PUSHn|5.006000|5.003007|
PUSHp|5.003007|5.003007|
PUSHs|5.003007|5.003007|
push_scope|5.003007|5.003007|u
PUSHSTACK|5.005000||Viu
PUSHSTACKi|5.005000||Viu
PUSHSTACK_INIT_HWM|5.027002||Viu
PUSHTARG|5.003007||Viu
PUSHu|5.004000|5.003007|p
PUTBACK|5.003007|5.003007|
putc|5.003007||Viu
put_charclass_bitmap_innards|5.021004||Viu
put_charclass_bitmap_innards_common|5.023008||Viu
put_charclass_bitmap_innards_invlist|5.023008||Viu
put_code_point|5.021004||Viu
putc_unlocked|5.003007||Viu
putenv|5.005000||Viu
put_range|5.019009||Viu
putw|5.003007||Viu
pv_display|5.006000|5.003007|p
xs/ppport.h view on Meta::CPAN
{
dSP;
SV* sv = newSVpv(p, 0);
PUSHMARK(sp);
eval_sv(sv, G_SCALAR);
SvREFCNT_dec(sv);
SPAGAIN;
sv = POPs;
PUTBACK;
D_PPP_CROAK_IF_ERROR(croak_on_error);
return sv;
}
#endif
#endif
#if ! defined(vload_module) && defined(start_subparse)
xs/typemap.old view on Meta::CPAN
struct archive * T_ARCHIVE_LIBARCHIVE_ARCHIVE
struct archive_entry * T_ARCHIVE_LIBARCHIVE_ARCHIVE_ENTRY
__LA_INT64_T T_INT64
string_or_null T_PV_OR_NULL
OUTPUT
T_ARCHIVE_LIBARCHIVE_ARCHIVE
sv_setref_pv($arg, \"Archive::Libarchive::XS::archive\", (void*) $var);
T_ARCHIVE_LIBARCHIVE_ARCHIVE_ENTRY
sv_setref_pv($arg, \"Archive::Libarchive::XS::archive_entry\", (void*) $var);
INPUT
T_ARCHIVE_LIBARCHIVE_ARCHIVE
if(sv_isobject($arg) && sv_derived_from($arg, \"Archive::Libarchive::XS::archive\"))
$var = INT2PTR($type, SvIV((SV *) SvRV($arg)));
else
Perl_croak(aTHX_ \"$var is not of type Archive::Libarchive::XS::archive\");
T_ARCHIVE_LIBARCHIVE_ARCHIVE_ENTRY
if(sv_isobject($arg) && sv_derived_from($arg, \"Archive::Libarchive::XS::archive_entry\"))
$var = INT2PTR($type, SvIV((SV *) SvRV($arg)));
else