Filesys-Virtual-0.06/0000755000175000017500000000000010463233464014134 5ustar xantusxantusFilesys-Virtual-0.06/MANIFEST0000644000175000017500000000010310463232536015256 0ustar xantusxantusREADME Changes MANIFEST Makefile.PL Virtual.pm t/00_use.t META.yml Filesys-Virtual-0.06/META.yml0000644000175000017500000000045610463233464015412 0ustar xantusxantus# http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Filesys-Virtual version: 0.06 version_from: Virtual.pm installdirs: site requires: distribution_type: module generated_by: ExtUtils::MakeMaker version 6.17 Filesys-Virtual-0.06/Changes0000644000175000017500000000124310463232760015425 0ustar xantusxantusRevision history for Perl extension Filesys::Virtual. 0.06 Sun Jul 30 2006 - updated the license, same as perl - renamed a test 0.05 Fri Jan 21 2005 - seperated Filesys::Virtual::Plain from Filesys::Virtual - added utime 0.04 Sun Apr 18 2004 - fixed problem with some dirs not shown as dirs in list - added file_path key in obj hashref so it has the last file opened - added size sub, returns file size of file 0.03 Mon Feb 16 2004 - added size command 0.02 Thu Feb 5 2004 - cleaned it up - full path changedir fixed - gid and uid caching fixed 0.01 Sun Dec 2 2001 - original version; created by h2xs 1.1.1.4 with options -XA -n Filesys::Virtual Filesys-Virtual-0.06/t/0000755000175000017500000000000010463233464014377 5ustar xantusxantusFilesys-Virtual-0.06/t/00_use.t0000644000175000017500000000122510463232516015654 0ustar xantusxantus# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' ######################### We start with some black magic to print on failure. # Change 1..1 below to 1..last_test_to_print . # (It may become useful if the test is moved to ./t subdirectory.) BEGIN { $| = 1; print "1..1\n"; } END {print "not ok 1\n" unless $loaded;} use Filesys::Virtual; $loaded = 1; print "ok 1\n"; ######################### End of black magic. # Insert your test code below (better if it prints "ok 13" # (correspondingly "not ok 13") depending on the success of chunk 13 # of the test code): Filesys-Virtual-0.06/Virtual.pm0000644000175000017500000001213010463232346016113 0ustar xantusxantuspackage Filesys::Virtual; ########################################################################### ### Filesys::Virtual ### L.M.Orchard (deus_x@ninjacode.com) ### David Davis (xantus@cpan.org) ### ### Object oriented interface to a filesystem datasource ### ### Copyright (c) 2001 Leslie Michael Orchard. All Rights Reserved. ### This module is free software; you can redistribute it and/or ### modify it under the same terms as Perl itself. ### ### Changes Copyright (c) 2003-2005 David Davis and Teknikill Software ########################################################################### use strict; use Carp; use IO::File; our $VERSION = '0.06'; # login: exactly that sub login { my ($self, $username, $password) = @_; carp ref($self)."::login() Unimplemented"; return 0; } # size: get a file's size sub size { my ($self, $mode, $fn) = @_; carp ref($self)."::size() Unimplemented"; return 0; } # chmod: Change a file's mode sub chmod { my ($self, $mode, $fn) = @_; carp ref($self)."::chmod() Unimplemented"; return 0; } # modtime: Return the modification time for a given file sub modtime { my ($self, $fn) = @_; carp ref($self)."::modtime() Unimplemented"; return 0; } # delete: Delete a given file sub delete { my ($self, $fn) = @_; carp ref($self)."::delete() Unimplemented"; return 0; } # cwd: sub cwd { my ($self, $cwd) = @_; carp ref($self)."::cwd() Unimplemented"; return 0; } # chdir: Change the cwd to a new path sub chdir { my ($self, $dir) = @_; carp ref($self)."::chdir() Unimplemented"; return 0; } # mkdir: Create a new directory sub mkdir { my ($self, $dir) = @_; carp ref($self)."::mkdir() Unimplemented"; return 0; } # rmdir: Remove a directory or file sub rmdir { my ($self, $dir) = @_; carp ref($self)."::rmdir() Unimplemented"; return 0; } # list: List files in a path. sub list { my ($self, $dirfile) = @_; carp ref($self)."::list() Unimplemented"; return undef; } # list_details: List files in a path, in full ls -al format. sub list_details { my ($self, $dirfile) = @_; carp ref($self)."::list_details() Unimplemented"; return undef; } # stat: Perform a stat on a given file sub stat { my ($self, $fn) = @_; carp ref($self)."::stat() Unimplemented"; return undef; } # test: Perform a given filesystem test # -r File is readable by effective uid/gid. # -w File is writable by effective uid/gid. # -x File is executable by effective uid/gid. # -o File is owned by effective uid. # -R File is readable by real uid/gid. # -W File is writable by real uid/gid. # -X File is executable by real uid/gid. # -O File is owned by real uid. # -e File exists. # -z File has zero size. # -s File has nonzero size (returns size). # -f File is a plain file. # -d File is a directory. # -l File is a symbolic link. # -p File is a named pipe (FIFO), or Filehandle is a pipe. # -S File is a socket. # -b File is a block special file. # -c File is a character special file. # -t Filehandle is opened to a tty. # -u File has setuid bit set. # -g File has setgid bit set. # -k File has sticky bit set. # -T File is a text file. # -B File is a binary file (opposite of -T). # -M Age of file in days when script started. # -A Same for access time. # -C Same for inode change time. sub test { my ($self, $test, $fn) = @_; carp ref($self)."::test() Unimplemented"; return undef; } # open_read sub open_read { my ($self, $fin, $create) = @_; carp ref($self)."::open_read() Unimplemented"; return undef; } # close_read sub close_read { my ($self, $fh) = @_; carp ref($self)."::close_read() Unimplemented"; return undef; } # open_write sub open_write { my ($self, $fin, $append) = @_; carp ref($self)."::open_write() Unimplemented"; return undef; } # close_write sub close_write { my ($self, $fh) = @_; carp ref($self)."::close_write() Unimplemented"; return undef; } # seek: seek, if supported by filesystem... # ie $fh is a filehandle # $fh->seek($first, $second); # see the module Filehandle sub seek { my ($self, $fh, $first, $second) = @_; carp ref($self)."::seek() Unimplemented"; return undef; } # utime: modify access time and mod time sub utime { my ($self, $atime, $mtime, @fn) = @_; carp ref($self)."::utime() Unimplemented"; return undef; } 1; __END__ =head1 NAME Filesys::Virtual - Perl extension to provide a framework for a virtual filesystem =head1 SYNOPSIS use Filesys::Virtual; =head1 DESCRIPTION This is a base class. See L below. =head2 EXPORT None by default. =head2 TODO Please contact David if you have any suggestions. =head1 AUTHORS David Davis, Exantus@cpan.orgE, http://teknikill.net/ L.M.Orchard, Edeus_x@pobox.comE =head1 LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO perl(1), L, L, L, L, L, L, http://perladvent.org/2004/20th/ =cut Filesys-Virtual-0.06/Makefile.PL0000644000175000017500000000045410174361400016100 0ustar xantusxantususe ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'Filesys::Virtual', 'VERSION_FROM' => 'Virtual.pm', # finds $VERSION 'PREREQ_PM' => { }, # e.g., Module::Name => 1.1 ); Filesys-Virtual-0.06/README0000644000175000017500000000130410463233216015005 0ustar xantusxantusNAME Filesys::Virtual - Perl extension to provide a framework for a virtual filesystem SYNOPSIS use Filesys::Virtual; DESCRIPTION This is a base class. See "SEE ALSO" below. EXPORT None by default. TODO Please contact David if you have any suggestions. AUTHORS David Davis, , http://teknikill.net/ L.M.Orchard, LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO perl(1), Filesys::Virtual, Filesys::Virtual::SSH, Filesys::Virtual::DAAP, POE::Component::Server::FTP, Net::DAV::Server, HTTP::Daemon, http://perladvent.org/2004/20th/