|
Posted by Jim Schueler on August 14, 2004, 9:41 am
Please log in for more thread options
Sample Code:
$a = new Archive::Tar ;
$a->add_files( 'images/kids.gif' ) ;
@files = $a->list_files() ; ## $files[0] is 'kids.gif'
chdir '/tmp' ;
$a->extract() ; ## writes new file 'kids.gif'
Second sample code:
$a = new Archive::Tar ;
$a->add_files( 'images/kids.gif' ) ;
$a->write( '/tmp/kids.tar' ) ;
$b = new Archive::Tar ;
$b->read( '/tmp/kids.tar' ) ;
@files = $b->list_files() ; ## $files[0] is 'images/kids.gif'
chdir '/tmp/ ;
$b->extract() ; ## creates subdirectory 'images'
## writes file 'images/kids.gif'
It's not obvious that this inconsistent behavior is useful. Am I the
first person to try to use this module for bulk directory copying?
|