Beefy Boxes and Bandwidth Generously Provided by pair Networks Russ
Just another Perl shrine
 
PerlMonks  

File transfer abstractor?

by suaveant (Parson)
on Mar 09, 2010 at 15:34 UTC ( #827568=perlquestion: print w/ replies, xml ) Need Help??
suaveant has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone know of a remote file retrieval abstractor for Perl or that could be called from Perl? Some Googling ans CPAN searching isn't coming back with anything.

I'm thinking something that basically lets you specify location, method and credentials and from there on offers a single interface whether it be ftp, ssh, sftp, http, local, email or whatever. Kind of like IO::Any, but Remote::File::Any

I see a File::Remote which looks cool, but is not what I had in mind.

                - Ant
                - Some of my best work - (1 2 3)

Comment on File transfer abstractor?
Re: File transfer abstractor?
by Corion (Pope) on Mar 09, 2010 at 15:45 UTC

    I fear the closest is LWP - it supports HTTP(s), FTP and local files. I think that SOAP at one time supported other transfer mechanisms, but the same time I looked into it, I shuddered away from it, fearing for my sanity. There is Filesys::Virtual, but it's relatively cumbersome to implement a new filesystem for it. There also is File::Fetch, but that mostly does what LWP does, except with other tools.

    I guess the best approach would be to write a ssh: protocol plugin for LWP.

    Cool! Upon looking at lwp protocol, I find there is LWP::Protocol::cpan, which should allow PM-style cpan:// URLs to work within LWP.

      I forgot to mention I wanted more than just fetching... ls, rename, rm, mv, perms..... that FileSys::Virtual looks like the idea. Thanks.

                      - Ant
                      - Some of my best work - (1 2 3)

Re: File transfer abstractor?
by ambrus (Abbot) on Mar 09, 2010 at 20:22 UTC

    Look at the curl wrappers of libcurl, like WWW::Curl.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://827568]
Approved by marto
Front-paged by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2014-04-17 19:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (454 votes), past polls