A software personality that operates as an anonymous, read-only FTP server.
One of the methods is called "get", which takes a filename as input and returns the file or directory handle corresponding to that name in the directory. If the name doesn't exist, the method returns undef.
Another useful method is "parent", which returns the parent directory of the current directory. If the current directory is already the root directory ("/"), the method returns the same directory handle.
The method "list" returns a list of the contents of the current directory. The list is sorted alphabetically and doesn't include "." or "..". The method also takes an optional argument to filter the file list with a wildcard pattern.
"list_status" is similar to "list", but it also returns status information for each entry in the list. The status information includes mode, permissions, link count, username, group name, size, and time.
The method "status" returns the status information of a given file or directory. The information includes mode, permissions, link count, username, group name, size, and time. Derived classes may synthesize some of this information if the virtual file system doesn't contain it.
"move" moves a file or directory to a new location and/or renames it. However, underlying file systems may impose limitations on moves, such as not being able to move a directory or move a file across file systems.
"delete" deletes the current directory, but only if it's empty. If successful, the method returns 0; otherwise, it returns -1.
Finally, "mkdir" creates a subdirectory within the current directory with a specified name. The method returns a non-negative value on success.
Overall, Net::FTPServer::RO::DirHandle provides a useful set of methods for read-only FTP servers. Additionally, the "open" method can be used to access files for read, write, or append operations.
Version 1.122: N/A