Apache2-FileManager

 view release on metacpan or  search on metacpan

FileManager.pm  view on Meta::CPAN

another server with the click of a button.


=head1 PREREQUISITES

The following (non-core) perl modules must be installed before installing
Apache2::FileManager.

 Apache/mod_perl => 2.0
 Archive::Any    => 0.03
 CGI::Cookie     => 1.20
 File::NCopy     => 0.32
 File::Remove    => 0.20

=head1 SPECIAL NOTES

Make sure the web server has read, write, and execute access access to the
directory you want to manage files in. Typically you are going to want to
run the following commands before you begin.

chown -R nobody /web/xyz/htdocs

FileManager.pm  view on Meta::CPAN

use Apache2::RequestUtil ();
use Apache2::ServerUtil ();
use Apache2::Upload;
use IO::File;
use File::NCopy  qw(copy);
use File::Copy   qw(move);
use File::Remove qw(remove);
use File::stat;
use Archive::Any;
use POSIX qw(strftime);
use CGI::Cookie;
#use Data::Dumper;

require 5.005_62;

our $VERSION = '0.20';

sub r { return Apache2::Request->new(Apache2::RequestUtil->request) }

# ---------- Object Constructor -----------------------------------------
sub new {

FileManager.pm  view on Meta::CPAN

}


sub get_clip_board {
  my $o = shift;

  #get copy and cut file arrays
  my $buffer_type = "";
  my $buffer_filenames = [];

  if (defined(r->headers_in->{'Cookie'})) {
    my $cookie_name = uc(r->hostname());
    $cookie_name =~ s/[^A-Z]//g;
    $cookie_name .= "_FM";
    my %cookies = CGI::Cookie->parse(r->headers_in->{'Cookie'});
    if (exists $cookies{$cookie_name}) {
      my $data = $cookies{$cookie_name}->value;
      my @ar = split /\|/, $data;

      #is there something in buffer
      if ($#ar > 0) {
        $buffer_type      = pop @ar;
        $buffer_filenames = \@ar;
      }
    }

Makefile.PL  view on Meta::CPAN

      'Apache2::ServerUtil' => 0,
      'Apache2::Const'      => 0,
      'Apache2::Log'        => 0,
      'Apache2::Upload'     => 0,
      'File::NCopy'       => 0.32,
      'File::Copy'        => 2.03,
      'File::Remove'      => 0.20,
      'File::stat'        => 0,
      'Archive::Any'      => 0.03,
      'POSIX'             => 1.03,
      'CGI::Cookie'       => 1.20,
      'IO::File'          => 0
    }
);



( run in 0.728 second using v1.01-cache-2.11-cpan-e9199f4ba4c )