NAME
CTK::Arc - Archives working
VERSION
1.00
$Id: Arc.pm 58 2012-12-26 10:45:15Z minus $
SYNOPSIS
# External extracting
$c->fextract(
-in => CTK::catfile($CTK::DATADIR,'in'), # Source directory (archives)
-out => CTK::catfile($CTK::DATADIR,'out'), # Destination directory (files)
-method => 'ext',
-list => qr/rar/, # Source mask (regular expression, filename or ArrayRef of files)
-arcdef => $config->{arc}, # Archive attributes (Hashref)
);
# Internal extracting
$c->fextract(
-in => CTK::catfile($CTK::DATADIR,'in'), # Source directory (archives)
-out => CTK::catfile($CTK::DATADIR,'out'), # Destination directory (files)
-method => 'zip', # Zip archive
-list => qr/zip/, # Source mask (regular expression, filename or ArrayRef of files)
-arcdef => $config->{arc}, # Archive attributes (Hashref)
);
# External files compressing
$c->fcompress(
-in => CTK::catfile($CTK::DATADIR,'in'), # Source directory (files)
-out => CTK::catfile($CTK::DATADIR,'out','ttt.rar'), # Archive name (filename)
-list => qr//, # Source mask (regular expression, filename or ArrayRef of files)
-arcdef => $config->{arc}, # Archive attributes (Hashref)
);
DESCRIPTION
Sample of $config->{arc} records:
ARC => {
tgz => {
"type" => "tar", # name
"ext" => "tgz", # extension
"create" => "tar -zcpf [FILE] [LIST]", # create command
"extract" => "tar -zxpf [FILE] [DIRDST]", # extract command
"exclude" => "--exclude-from ",
"list" => "tar -ztf [FILE]",
"nocompress" => "tar -cpf [FILE]"
},
...
}
KEYS
- FILE
-
Path and filename
- FILENAME
-
Filename only
- DIRSRC
-
Source directory. Path only
- DIRIN
-
See DIRSRC
- DIRDST
-
Destination directory. Path only
- DIROUT
-
See DIRDST
- EXC
-
Reserved
- LIST
-
Reserved
AUTHOR
Serz Minus (Lepenkov Sergey) http://serzik.ru <minus@mail333.com>
COPYRIGHT
Copyright (C) 1998-2012 D&D Corporation. All Rights Reserved
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms and conditions as Perl itself.
This program is distributed under the GNU LGPL v3 (GNU Lesser General Public License version 3).
See LICENSE
file