sshaw > NcFTPd-Log-Parse > NcFTPd::Log::Parse::Xfer

Download:
NcFTPd-Log-Parse-0.001.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

NcFTPd::Log::Parse::Xfer - parse NcFTPd xfer logs

SYNOPSIS ^

  use NcFTPd::Log::Parse::Xfer;
  $parser = NcFTPd::Log::Parse::Xfer->new('xfer.20100101');


  while($line = $parser->next) {
    if($line->{operation} eq 'S') {
      print 'Upload';
      $line->{pathname};
      $line->{size};
      # ...
    }
  }

  # Check for an error, otherwise it was EOF
  if($parser->error) {
    die 'Parsing failed: ' . $parser->error;
  }

DESCRIPTION ^

This class is part of the NcFTPd::Log::Parse package. Refer to its documentation for a detailed overview of how this and the other parsers work.

Only NcFTPd::Log::Parse::Xfer specific features are described here.

XFER LOG ENTRIES ^

Parsed Xfer log entries are returned as hash references whose keys are dependent on the entry's operation. Operations are described below.

Logs created by older versions of NcFTPd may contain less fields than listed here. In these cases the missing field(s) will have a value of undef.

Only the non-obvious fields are described.

chmod

chmod entries have an operation code of C

delete

delete entries have an operation code of D

link

link entries have an operation code of L

listing

Directory listing entries have an operation code of T

mkdir

Mkdir entries have an operation code of M. The fields are the same as the delete operation's.

rename

Rename entries have an operation code of N. The fields are the same as the link operation's.

retrieve

Retrieve entries (downloads) have an operation code of R. The fields are the same as the store operation's.

store

Store entries (uploads) have an operation code of S

METHODS ^

See NcFTPd::Log::Parse for the full documentation.

new

Create a parser capable of parsing the specified xfer log:

    $parser = NcFTPd::Log::Parse::Xfer->new($file, %options)

Returns

A parser capable of parsing the specified xfer log.

Arguments

%options

Errors

If a parser cannot be created an error will be raised.

SEE ALSO ^

NcFTPd::Log::Parse, NcFTPd::Log::Parse::Session, NcFTPd::Log::Parse::Misc and the NcFTPd log file documentation http://ncftpd.com/ncftpd/doc/misc

AUTHOR ^

Skye Shaw <sshaw AT lucas.cis.temple.edu>

COPYRIGHT ^

Copyright (C) 2011 Skye Shaw

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: