VFSsimple
A library to magically access to file w/o carry the method
my $vfs = VFSsimple->new($url) or die "can't get the vfs"; $vfs->copy("path/fichier", "/tmp/fichier") or die "can't get file";
Instanciate a new VFSimple object over $root url.
$root The root of the vfs
$options is a hashref:
Force the virtal access method to use
The $root should be a valid url:
protocol://server/path file://path
A standard file path can also be used, understood as file://.
The access method to use is find automatically using url infromation:
- protocol from url - if protocol is either file:// or ext:// and target is a file, the extension is use.
The automatic behavior can overide by setting vfs option.
For local file abstraction, an additionnal path can be append to set the root inside the archive:
file://path/file.ext/subpath
Return the root of the VFS.
Return the last error.
Fetch the file if necessary, and return the local location where it has been copied.
Fetch the file if necessary and return an open file handle on it.
Copy $src file from vfs into $dest local file
Return True if $file exists on the VFS
(c) 2006, 2007 Olivier Thauvin <nanardon@nanardon.zarb.org>
/* This program is free software. It comes without any warranty, to * the extent permitted by applicable law. You can redistribute it * and/or modify it under the terms of the Do What The Fuck You Want * To Public License, Version 2, as published by Sam Hocevar. See * http://sam.zoy.org/wtfpl/COPYING for more details. */
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar 14 rue de Plaisance, 75014 Paris, France Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO.
To install VFSsimple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VFSsimple
CPAN shell
perl -MCPAN -e shell install VFSsimple
For more information on module installation, please visit the detailed CPAN module installation guide.