NAME

CTK::Arc - Archives working

VERSION

Version 1.71

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

METHODS

fextract

# 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)
    );

Extracting the files group

fcompress

# 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)
    );

Compressing the files group

AUTHOR

Sergey Lepenkov (Serz Minus) http://www.serzik.com <minus@mail333.com>

COPYRIGHT

Copyright (C) 1998-2017 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