1Net::FTPServer::RO::DirUHsaenrdlCeo(n3t)ributed Perl DocNuemte:n:tFaTtPiSoenrver::RO::DirHandle(3)
2
3
4

NAME

6       Net::FTPServer::RO::DirHandle - The anonymous, read-only FTP server
7       personality
8

SYNOPSIS

10         use Net::FTPServer::RO::DirHandle;
11

METHODS

13       $handle = $dirh->get ($filename);
14           Return the file or directory $handle corresponding to the file
15           $filename in directory $dirh. If there is no file or subdirectory
16           of that name, then this returns undef.
17
18       $dirh = $dirh->parent;
19           Return the parent directory of the directory $dirh. If the
20           directory is already "/", this returns the same directory handle.
21
22       $ref = $dirh->list ([$wildcard]);
23           Return a list of the contents of directory $dirh. The list returned
24           is a reference to an array of pairs:
25
26             [ $filename, $handle ]
27
28           The list returned does not include "." or "..".
29
30           The list is sorted into alphabetical order automatically.
31
32       $ref = $dirh->list_status ([$wildcard]);
33           Return a list of the contents of directory $dirh and status
34           information. The list returned is a reference to an array of
35           triplets:
36
37             [ $filename, $handle, $statusref ]
38
39           where $statusref is the tuple returned from the "status" method
40           (see Net::FTPServer::Handle).
41
42           The list returned does not include "." or "..".
43
44           The list is sorted into alphabetical order automatically.
45
46       ($mode, $perms, $nlink, $user, $group, $size, $time) = $handle->status;
47           Return the file or directory status. The fields returned are:
48
49             $mode     Mode        'd' = directory,
50                                   'f' = file,
51                                   and others as with
52                                   the find(1) -type option.
53             $perms    Permissions Permissions in normal octal numeric format.
54             $nlink    Link count
55             $user     Username    In printable format.
56             $group    Group name  In printable format.
57             $size     Size        File size in bytes.
58             $time     Time        Time (usually mtime) in Unix time_t format.
59
60           In derived classes, some of this status information may well be
61           synthesized, since virtual filesystems will often not contain
62           information in a Unix-like format.
63
64       $rv = $handle->move ($dirh, $filename);
65           Move the current file (or directory) into directory $dirh and call
66           it $filename. If the operation is successful, return 0, else return
67           -1.
68
69           Underlying filesystems may impose limitations on moves: for
70           example, it may not be possible to move a directory; it may not be
71           possible to move a file to another directory; it may not be
72           possible to move a file across filesystems.
73
74       $rv = $dirh->delete;
75           Delete the current directory. If the delete command was successful,
76           then return 0, else if there was an error return -1.
77
78           It is normally only possible to delete a directory if it is empty.
79
80       $rv = $dirh->mkdir ($name);
81           Create a subdirectory called $name within the current directory
82           $dirh.
83
84       $file = $dirh->open ($filename, "r"|"w"|"a");
85           Open or create a file called $filename in the current directory,
86           opening it for either read, write or append. This function returns
87           a "IO::File" handle object.
88

AUTHORS

90       Richard Jones (rich@annexia.org).
91
93       Copyright (C) 2000 Biblio@Tech Ltd., Unit 2-3, 50 Carnwath Road,
94       London, SW6 3EG, UK
95

SEE ALSO

97       Net::FTPServer(3), perl(1)
98
99
100
101perl v5.30.0                      2019-07-26  Net::FTPServer::RO::DirHandle(3)
Impressum