.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Dpkg::Archive::Ar 3perl"
.TH Dpkg::Archive::Ar 3perl 2025-03-09 1.22.18 libdpkg-perl
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
Dpkg::Archive::Ar \- Unix ar archive support
.SH DESCRIPTION
.IX Header "DESCRIPTION"
This module provides a class to handle Unix ar archives.
It support the common format, with no GNU or BSD extensions.
.PP
\&\fBNote\fR: This is a private module, its API can change at any time.
.SH METHODS
.IX Header "METHODS"
.ie n .IP "$ar = Dpkg::Archive::Ar\->new(%opts)" 8
.el .IP "\f(CW$ar\fR = Dpkg::Archive::Ar\->new(%opts)" 8
.IX Item "$ar = Dpkg::Archive::Ar->new(%opts)"
Create a new object to handle Unix ar archives.
.Sp
Options:
.RS 8
.IP \fBfilename\fR 8
.IX Item "filename"
The filename for the archive to open or create.
.IP \fBcreate\fR 8
.IX Item "create"
A boolean denoting whether the archive should be created,
otherwise if it does not exist the constructor will not open, create or
scan it.
.RE
.RS 8
.RE
.ie n .IP $ar\->create_archive($filename) 8
.el .IP \f(CW$ar\fR\->create_archive($filename) 8
.IX Item "$ar->create_archive($filename)"
Create the archive.
.ie n .IP $ar\->open_archive($filename) 8
.el .IP \f(CW$ar\fR\->open_archive($filename) 8
.IX Item "$ar->open_archive($filename)"
Open the archive.
.ie n .IP $ar\->\fBparse_magic()\fR 8
.el .IP \f(CW$ar\fR\->\fBparse_magic()\fR 8
.IX Item "$ar->parse_magic()"
Reads and parses the archive magic string, and validates it.
.ie n .IP $ar\->\fBparse_member()\fR 8
.el .IP \f(CW$ar\fR\->\fBparse_member()\fR 8
.IX Item "$ar->parse_member()"
Reads and parses the archive member and tracks it for later handling.
.ie n .IP $ar\->skip_member($member) 8
.el .IP \f(CW$ar\fR\->skip_member($member) 8
.IX Item "$ar->skip_member($member)"
Skip this member to the next one.
Get the value of a given substitution.
.ie n .IP $ar\->\fBscan_archive()\fR 8
.el .IP \f(CW$ar\fR\->\fBscan_archive()\fR 8
.IX Item "$ar->scan_archive()"
Scan the archive for all its member files and metadata.
.ie n .IP $ar\->\fBget_members()\fR 8
.el .IP \f(CW$ar\fR\->\fBget_members()\fR 8
.IX Item "$ar->get_members()"
Get the list of members in the archive.
.ie n .IP $ar\->extract_member($member) 8
.el .IP \f(CW$ar\fR\->extract_member($member) 8
.IX Item "$ar->extract_member($member)"
Extract the specified member to the current directory.
.ie n .IP $ar\->write_member($member) 8
.el .IP \f(CW$ar\fR\->write_member($member) 8
.IX Item "$ar->write_member($member)"
Write the provided \f(CW$member\fR into the archive.
.ie n .IP $ar\->add_file($filename) 8
.el .IP \f(CW$ar\fR\->add_file($filename) 8
.IX Item "$ar->add_file($filename)"
Append the specified \f(CW$filename\fR into the archive.
.ie n .IP $ar\->\fBclose_archive()\fR 8
.el .IP \f(CW$ar\fR\->\fBclose_archive()\fR 8
.IX Item "$ar->close_archive()"
Close the archive and release any allocated resource.
.SH CHANGES
.IX Header "CHANGES"
.SS "Version 0.xx"
.IX Subsection "Version 0.xx"
This is a private module.