1Net::FTPServer::Handle(U3s)er Contributed Perl DocumentatNieotn::FTPServer::Handle(3)
2
3
4
6 Net::FTPServer::Handle - A generic Net::FTPServer file or directory
7 handle.
8
10 use Net::FTPServer::Handle;
11
13 $handle = Net::FTPServer::Handle->new ($ftps);
14 Create a new handle. You would normally call this from a derived
15 class.
16
17 $rv = $handle->equals ($other_handle);
18 Decide if two handles refer to the same thing (file or directory).
19
20 ($mode, $perms, $nlink, $user, $group, $size, $time) = $handle->status;
21 Return the file or directory status. The fields returned are:
22
23 $mode Mode 'd' = directory,
24 'f' = file,
25 and others as with
26 the find(1) -type option.
27 $perms Permissions Permissions in normal octal numeric format.
28 $nlink Link count
29 $user Username In printable format.
30 $group Group name In printable format.
31 $size Size File size in bytes.
32 $time Time Time (usually mtime) in Unix time_t format.
33
34 In derived classes, some of this status information may well be
35 synthesized, since virtual filesystems will often not contain
36 information in a Unix-like format.
37
38 $name = $handle->pathname;
39 Return the full path of this file or directory. The path consists
40 of all components separated by "/" characters.
41
42 If the object is a directory, then the pathname will have a "/"
43 character at the end.
44
45 $name = $handle->filename;
46 Return the filename part of the path. If the file is a directory,
47 then this function returns "".
48
49 $name = $handle->dirname;
50 Return the directory name part of the path. The directory name
51 always has a trailing "/" character.
52
53 $rv = $handle->move ($dirh, $filename);
54 Move the current file (or directory) into directory $dirh and call
55 it $filename. If the operation is successful, return 0, else return
56 -1.
57
58 Underlying filesystems may impose limitations on moves: for
59 example, it may not be possible to move a directory; it may not be
60 possible to move a file to another directory; it may not be
61 possible to move a file across filesystems.
62
63 $rv = $handle->delete;
64 Delete the current file or directory. If the delete command was
65 successful, then return 0, else if there was an error return -1.
66
67 Different underlying file systems may impose restrictions on this
68 command: for example, it may not be possible to delete directories,
69 or only if they are empty.
70
71 This is a virtual function which is actually implemented in one of
72 the subclasses.
73
75 Richard Jones (rich@annexia.org).
76
78 Copyright (C) 2000 Biblio@Tech Ltd., Unit 2-3, 50 Carnwath Road,
79 London, SW6 3EG, UK
80
82 Net::FTPServer(3), perl(1)
83
84
85
86perl v5.36.0 2023-01-20 Net::FTPServer::Handle(3)