Net::FTPServer::RO::FileHandle(3pm)

Net::FTPServer::RO::FileHandle3pm

The anonymous, read-only ftp server personality

Usage

  use Net::FTPServer::RO::FileHandle;

Overview

Methods

$dirh = $fileh->dir;

Return the directory which contains this file.

$fh = $fileh->open (["r"|"w"|"a"]);

Open a file handle (derived from "IO::Handle", see IO::Handle(3)) in either read or write mode.

($mode, $perms, $nlink, $user, $group, $size, $time) = $handle->status;

Return the file or directory status. The fields returned are:

  $mode     Mode        'd' = directory,
                        'f' = file,
                        and others as with
                        the find(1) -type option.
  $perms    Permissions Permissions in normal octal numeric format.
  $nlink    Link count
  $user     Username    In printable format.
  $group    Group name  In printable format.
  $size     Size        File size in bytes.
  $time     Time        Time (usually mtime) in Unix time_t format.

In derived classes, some of this status information may well be synthesized, since virtual filesystems will often not contain information in a Unix-like format.

$rv = $handle->move ($dirh, $filename);

Move the current file (or directory) into directory $dirh and call it $filename. If the operation is successful, return 0, else return -1.

Underlying filesystems may impose limitations on moves: for example, it may not be possible to move a directory; it may not be possible to move a file to another directory; it may not be possible to move a file across filesystems.

$rv = $fileh->delete;

Delete the current file. If the delete command was successful, then return 0, else if there was an error return -1.

$link = $fileh->readlink;

If the current file is really a symbolic link, read the contents of the link and return it.

Releases

2 releases since Debian 3.0 (Woody); the text changed 1 time.

  1. 3.0
  2. 3.1

Authors

Richard Jones ([email protected]).

From libnet-ftpserver-perl 1.120-1 in Debian 3.1 (Sarge). Parsed by carta from the page's man source.