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

DESCRIPTION

METHODS

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

AUTHORS

101       Richard Jones (rich@annexia.org).
102
104       Copyright (C) 2000 Biblio@Tech Ltd., Unit 2-3, 50 Carnwath Road,
105       London, SW6 3EG, UK
106

SEE ALSO

108       Net::FTPServer(3), perl(1)
109

POD ERRORS

111       Hey! The above document had some coding errors, which are explained
112       below:
113
114       Around line 37:
115           You can't have =items (as at line 59) unless the first thing after
116           the =over is an =item
117
118       Around line 332:
119           =back doesn't take any parameters, but you said =back 4
120
121
122
123perl v5.12.0                      2004-11-10  Net::FTPServer::RO::DirHandle(3)
Impressum