Archive::Cpio man page on OpenMandriva

Man page or keyword search:  
man Server   8135 pages
apropos Keyword Search (all sections)
Output format
OpenMandriva logo
[printable version]

Archive::Cpio(3)      User Contributed Perl Documentation     Archive::Cpio(3)

NAME
       Archive::Cpio - module for manipulations of cpio archives

SYNOPSIS
	   use Archive::Cpio;

	   # simple example removing entry "foo"

	   my $cpio = Archive::Cpio->new;
	   $cpio->read($file);
	   $cpio->remove('foo');
	   $cio->write($file);

	    # more complex example, filtering on the fly

	   my $cpio = Archive::Cpio->new;
	   $cpio->read_with_handler(\*STDIN,
		       sub {
			   my ($e) = @_;
			   if ($e->name ne 'foo') {
			       $cpio->write_one(\*STDOUT, $e);
			   }
		       });
	   $cpio->write_trailer(\*STDOUT);

DESCRIPTION
       Archive::Cpio provides a few functions to read and write cpio files.

   Archive::Cpio->new()
       Create an object

   $cpio->read($filename)
   $cpio->read($filehandle)
       Reads the cpio file

   $cpio->write($filename)
   $cpio->write($filehandle)
       Writes the entries and the trailer

   $cpio->remove(@filenames)
       Removes any entries with names matching any of the given filenames from
       the in-memory archive

   $cpio->get_files([ @filenames ])
       Returns a list of "Archive::Cpio::File" (after a "$cpio-"read>)

   $cpio->get_file($filename)
       Returns the "Archive::Cpio::File" matching "$filename< (after a
       "$cpio-"read")

   $cpio->add_data($filename, $data, $opthashref)
       Takes a filename, a scalar full of data and optionally a reference to a
       hash with specific options.

       Will add a file to the in-memory archive, with name $filename and
       content $data.  Specific properties can be set using $opthashref.

   $cpio->read_with_handler($filehandle, $coderef)
       Calls the handler function on each header. An "Archive::Cpio::File" is
       passed as a parameter

   $cpio->write_one($filehandle, $entry)
       Writes a "Archive::Cpio::File" (beware, a valid cpio needs a trailer
       using "write_trailer")

   $cpio->write_trailer($filehandle)
       Writes the trailer to finish the cpio file

AUTHOR
       Pascal Rigaux <pixel@mandriva.com>

perl v5.16.3			  2011-05-30		      Archive::Cpio(3)
[top]

List of man pages available for OpenMandriva

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net