Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

GT::Tar ... making new tar...

Quote Reply
GT::Tar ... making new tar...
Hi. I'm trying to make a TAR file from all the files in the template folder. I currently have;

Code:
my @file_list;
my $file;
opendir(DIR, $CFG->{admin_root_path}) or die "Can't opendir $CFG->{admin_root_path}: $!\n";
while (defined($file = readdir(DIR))) {
if ($file =~ /\.(html|txt)/i){
push @file_list, $file;
}
}
close(DIR);

my $tar = new GT::Tar;

foreach (@file_list) {
$tar->add_file( $CFG->{admin_root_path} . "/templates/default/" . $_ );
}

$tar->write('Templates.tar');

...however, this gives me;

Quote:
GT::Tar (7227): Bad arguments passed to new(). Reason: No output archive passed in at /home/linkssql/linkssql.net/cgi-bin/imageSQL/admin/Plugins/Admin_Make_Temp.pm line 48.

...line 48 is;

Code:
my $tar = new GT::Tar;

I've taken a look through the plugin managed, but I can't see where new files are added in the plugin wizard.. so it wasn't much help :(

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread GT::Tar ... making new tar... Andy 2079 Jan 30, 2004, 7:54 AM
Thread Re: [Andy] GT::Tar ... making new tar...
Andy 1998 Jan 30, 2004, 8:16 AM
Post Re: [Andy] GT::Tar ... making new tar...
Andy 1964 Jan 30, 2004, 8:30 AM