WebFS::FileCopy is a Perl module to get, put, move, copy, and delete files located by URIs.
my @res = get_urls('ftp://www.perl.com', 'http://www.netscape.com');
print $res->content if $res->is_success;
# Get content from pages requiring basic authentication.
my $req = LWP::Request->new('GET' => 'http://www.dummy.com/');
@res = get_urls($req);
put_urls('put this text', 'ftp://ftp/incoming/new', 'file:/tmp/NEW');
['file:/tmp/DIR1/', 'file:/tmp/DIR2', 'ftp://ftp/incoming/']);
my @list1 = list_url('file:/tmp');
my @list2 = list_url('ftp://ftp/outgoing/');
This package provides some simple routines to read, move, copy, and delete files as references by string URLs, URI objects or URIs embedded in HTTP::Reqeust or LWP::Request objects. All subroutines in this package that expect a URI will accept a string, a URI object, or a HTTP::Reqeust or LWP::Request with an embedded URI. If passed a HTTP::Request or LWP::Request, then the method of the object is ignored and the proper method will be used to either GET or PUT the requested UIR.
The distinction between files and directories in a URI is tested by looking for a trailing / in the path. If a trailing / exists, then the URI is considered to point to a directory, otherwise it is a file.
All of the following subroutines are exported to the users namespace automatically. If you do not want this, then require this package instead of useing it.