Main > Programming > Libraries >

File::Remote 1.17

File::Remote 1.17

Sponsored Links

File::Remote 1.17 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.015 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 915
Date added: 2007-04-27

File::Remote 1.17 description

File::Remote is a Perl module to read/write/edit remote files transparently.

SYNOPSIS

#
# Two ways to use File::Remote
#
# First, the function-based style. Here, we can use the
# special :replace tag to overload Perl builtins!
#
use File::Remote qw(:replace); # special :replace tag

# read from a remote file
open(REMOTE, "host:/remote/file") or die $!;
print while (< REMOTE >);
close(REMOTE);

# writing a local file still works!
open(LOCAL, ">>/local/file");
print LOCAL "This is a new line.n";
close(LOCAL);

mkdir("host:/remote/dir", 0755);
unlink("host:/remote/file");
unlink("/local/file"); # still works too!
symlink("host:/remote/src", "host:/remote/dest");

chown("root", "other", "host:/remote/dir/file");
chmod(0600, "host:/remote/dir/file");

#
# Next, the object-oriented style, if you dont want to
# mess with the builtins.
#
use File::Remote;
my $remote = new File::Remote;

# Standard filehandles
$remote->open(FILE, ">>host:/remote/file") or die $!;
print FILE "Heres a line thats added.n";
$remote->close(FILE);

# Create a new file and change its permissions
$remote->mkdir("host:/remote/dir");
$remote->touch("host:/remote/dir/file");

# Move files around
$remote->copy("/local/file", "host:/remote/file") or warn $!;
$remote->move("host:/remote/file", "/local/file");

# Read and write whole files
my @file = $remote->readfile("host:/remote/file");
$remote->writefile("/local/file", @file);

# Backup a file with a suffix
$remote->backup("host:/remote/oldfile", "save");

# Use secure connection methods
my $secure = new File::Remote (rsh => "/usr/local/bin/ssh",
rcp => "/usr/local/bin/scp");
$secure->unlink("/local/file");
$secure->rmdir("host:/remote/dir");

This module takes care of dealing with files regardless of whether theyre local or remote. It allows you to create and edit files without having to worry about their physical location on the network. If a file passed into a function is of the form host:/path/to/file, then File::Remote uses rsh/rcp (or ssh/scp, depending on how you configure it) to edit the file remotely. Otherwise, it assumes the file is local and passes calls directly through to Perls core functions.

The nice thing about this module is that you can use it for all your file calls, since it handles both remote and local files transparently. This means you dont have to put a whole bunch of checks for remote files in your code. Plus, if you use the function-oriented interface along with the :replace tag, you can actually redefine the Perl builtin file functions. This means that your existing Perl scripts can automatically handle remote files with no re-engineering(!).

File::Remote 1.17 Screenshot

Advertisements

File::Remote 1.17 Keywords

Bookmark File::Remote 1.17

Hyperlink code:
Link for forum:

File::Remote 1.17 Copyright

WareSeeker periodically updates pricing and software information of File::Remote 1.17 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of File::Remote 1.17 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
File::MMagic is a Perl module to guess file type. Free Download
ExtUtils::Embed is a Perl module with utilities for embedding Perl in C/C++ applications. Free Download
File::NFSLock is a Perl module to do NFS (or not) locking. Free Download
CGI::Builder::Magic Perl module contains CGI::Builder and Template::Magic integration. Free Download
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. Free Download
Locale::Memories is a Perl module for L10N Message Retrieval. Free Download
movieinfo is a Perl module created to dump information about movie file(s). Free Download
File::BasicFlock is a Perl module for file locking with flock. Free Download