The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

  RemoteFileSelect.pm--Browse directories with FTP.

SYNOPSIS

  use Tk::RemoteFileSelect;
  use Tk::LoginDialog;

  my $dialog;  # Reference to RemoteFileSelect widget.
  my $file;    # File selected in the widget.

  $dialog = $mw -> RemoteFileSelect( -directory => '.' );
  $file = $dialog -> Show;

DESCRIPTION

A RemoteFileSelect dialog contains two listboxes that display subdirectories and files, a directory entry and a file name entry, and buttons for each operation, which are labeled with Alt-key accelerators.

When entering a file name, RemoteFileSelect verifies whether the file already exists. If a file is selected in the listbox, RemoteFileSelect returns that file's name when the user clicks the 'Accept' button, presses Enter after typing a name in the file entry, or double clicks on a selection in the file list box.

Additionally, if the Net::FTP module is installed, RemoteFileSelect activates an additional "Host" button. Clicking "Host" prompts for the name of a remote system, and your user name and password. After logging in with FTP, you can browse and select files on the remote system.

If a file name is selected on the local system, then RemoteFileSelect returns the path to the file, the same as a standard FileSelect widget.

If a file is selected on a remote host, then RemoteFileSelect returns the name in the form:

  host:/full-pathname-of-file

RemoteFileSelect requires Net::FTP, part of libnet, to be installed. If it cannot find and load Net::FTP, RemoteFileSelect behaves like a standard FileSelect widget, and the "Host" button is grayed out.

RemoteFileSelect.pm was developed with the Net::FTP module distributed with libnet-1.12, from http://www.cpan.org/.

All other operations function as in a FileSelect widget. Please refer to the FileSelect.pm POD documentation.

VERSION INFO

  $Revision: 0.58 $

AUTHOR

Robert Allan Kiesling <rkiesling@earthlink.net>