NAME
CTK::Plugin::Net - Net plugin
VERSION
Version 1.00
SYNOPSIS
use CTK;
my $ctk = new CTK(
plugins => "net",
);
$ctk->fetch(
-url => 'ftp://anonymous:anonymous@192.168.200.8/mbutiny/rsp?Debug=1&Passive=1',
-command => "copy", # copy / copyuniq / move / moveuniq
-dirdst => "/path/to/destination/dir", # Destination directory
-regexp => qr/tmp$/,
);
$ctk->store(
-url => 'ftp://anonymous:anonymous@192.168.200.8/mbutiny/rsp?Debug=1&Passive=1',
-command => "copy", # copy / copyuniq / move / moveuniq
-dirsrc => "/path/to/source/dir", # Source directory
-regexp => qr/tmp$/,
)
DESCRIPTION
Net plugin
METHODS
- fetch
-
$ctk->fetch( -url => 'ftp://anonymous:anonymous@192.168.200.8/mbutiny/rsp?Debug=1&Passive=1', -command => "copy", # copy / copyuniq / move / moveuniq -dirdst => "/path/to/destination/dir", # Destination directory -files => ['foo.tgz', 'bar.tgz', 'baz.tgz'], );
Download specified files from resource
$ctk->fetch( -url => 'ftp://anonymous:anonymous@192.168.200.8/mbutiny/rsp?Debug=1&Passive=1', -command => "copy", # copy / copyuniq / move / moveuniq -dirdst => "/path/to/destination/dir", # Destination directory -regexp => qr/tmp$/, );
Download files from remote resource by regexp mask
- -url
-
URL of resource.
For example:
ftp://anonymous:anonymous@192.168.200.8/mbutiny/rsp?Debug=1&Passive=1
Debug=1&Passive=1 -- Net::FTP atrtributes. See Net::FTP
- -dirout, -out, -output, -dirdst, , -dst
-
Specifies desination directory
Default: current directory
- -list, -mask, -file, -files, -regexp
-
-list => [qw/ file1.txt file2.txt file3.* /]
List of files
-file => "file1.txt"
Name of file
-regexp => qr/\.(cgi|pl)$/i
Regexp
Default: undef (all files)
- -cmd, -command, -action
-
Command name. Allowed: copy, copyuniq, move, moveuniq
Default: copy
- store
-
$ctk->store( -url => 'ftp://anonymous:anonymous@192.168.200.8/mbutiny/rsp?Debug=1&Passive=1', -command => "copy", # copy / copyuniq / move / moveuniq -dirsrc => "/path/to/source/dir", # Source directory -regexp => qr/tmp$/, )
Upload files from local directory to remote resource by regexp mask
- -url
-
URL of resource.
For example:
ftp://anonymous:anonymous@192.168.200.8/mbutiny/rsp?Debug=1&Passive=1
Debug=1&Passive=1 -- Net::FTP atrtributes. See Net::FTP
- -dirin, -in, -input, -dirsrc, , -src
-
Specifies source directory
Default: current directory
- -list, -mask, -glob, -file, -files, -regexp
-
-list => [qw/ file1.zip file2.zip foo*.zip /]
List of files or globs
-glob => "*.zip"
Glob pattern
-file => "file1.zip"
Name of file
-regexp => qr/\.(zip|zip2)$/i
Regexp
Default: undef (all files)
- -cmd, -command, -action
-
Command name. Allowed: copy, copyuniq, move, moveuniq
Default: copy
HISTORY
See Changes
file
DEPENDENCIES
TO DO
* Use SSH (SFTP)
See TODO
file
BUGS
* none noted
SEE ALSO
AUTHOR
Serż Minus (Sergey Lepenkov) http://www.serzik.com <abalama@cpan.org>
COPYRIGHT
Copyright (C) 1998-2019 D&D Corporation. All Rights Reserved
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See LICENSE
file and https://dev.perl.org/licenses