Apache-FileManager

 view release on metacpan or  search on metacpan

FileManager.pm  view on Meta::CPAN

=head1 PREREQUISITES 

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

 Apache::Request => 1.00
 Apache::File    => 1.01
 File::NCopy     => 0.32
 File::Remove    => 0.20
 Archive::Any    => 0.03
 CGI::Cookie     => 1.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
chmod -R 755 /web/xyz/htdocs

FileManager.pm  view on Meta::CPAN

use IO::File;
use Apache::Request;
use Apache::Util qw(escape_html);
use Apache::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 Apache::Constants ':common';
#use Data::Dumper;

require 5.005_62;

our $VERSION = '0.19';

sub r  { return Apache::Request->instance( Apache->request ); }


FileManager.pm  view on Meta::CPAN

  return strftime "%D %l:%M %P", localtime($date);
}

sub get_clip_board {
  my $o = shift;

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

  if (r->header_in('Cookie')) {
    my $cookie_name = uc(r->server->server_hostname);
    $cookie_name =~ s/[^A-Z]//g;
    $cookie_name .= "_FM";
    my %cookies = CGI::Cookie->parse(r->header_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

    'PREREQ_PM'		=> { 
      'Apache::Request'   => 0,
      'Apache::Util'      => 0,
      'Apache::File'      => 1.01,
      '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,
      'Apache::Constants' => 1.09,
      'IO::File'          => 0
    }
);



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