NAME
RemoteFileSelect.pm--Browse directories with FTP.
SYNOPSIS
use Tk::RemoteFileSelect;
my $dialog; # Reference to RemoteFileSelect widget.
my $file; # File selected in the widget.
$dialog = $mw -> RemoteFileSelect( -directory => '.' );
$file = $dialog -> Show;
DESCRIPTION
A RemoteFileSelect dialog displays list boxes for subdirectories and files, a directory entry and a file name entry, and buttons for each of the widget's operations.
Tk::RemoteFileSelect -> Show () returns the file's path name when clicking on the, "Accept," button. Show () also returns a file name after pressing, "Enter," after typing a name in the file entry, or after double clicking on a file name.
If Net::FTP is installed, RemoteFileSelect enables the, "Host," button. Clicking on, "Host," prompts for the name of a remote system, and user name and password. After logging in with FTP, the dialog can browse and select files using the remote FTP server.
When selecting files without logging in to a remote system, RemoteFileSelect returns the file's path like a Tk::FileSelect dialog.
After logging in to a FTP server, however, RemoteFileSelect returns path names of files in the the following format.
host:/full-pathname-of-file
If RemoteFileSelect cannot find and load Net::FTP, then the widget behaves like a FileSelect dialog, and the, "Host," button is grayed out.
OPTIONS
- Name: width
- Switch: -width
-
Width of the file and directory list boxes.
- Name: height
- Switch: -height
-
Height of the file and directory list boxes.
- Name: directory
- Switch: -directory
- Name: initialdir
- Switch: -initialdir
-
Specifies the initial directory when selecting files on a local system.
- Name: remotedirectory
- Switch: -remotedirectory
-
Specifies the initial directory to start in after connecting to remote hosts. Value may be a directory or a hash reference which specifies host and directory; e.g.
-remotedirectory => { host1 => /some/directory, host2 => /other/directory }
- Name: filelabel
- Switch: -filelabel
-
Text of the file entry label.
- Name: filelistlabel
- Switch: -filelistlabel
-
Text of the file list box title.
- Name: filter
- Switch: -filter
-
Display file names that match the file glob pattern of the value.
- Name: hostname
- Switch: -hostname
-
Initial value of the remote host name.
- Name: transcript
- Switch: -transcript
-
Print a transcript of the FTP session to standard output.
- Name: userid
- Switch: -userid
-
The initial value of the remote user ID.
- Name: dirlistlabel
- Switch: -dirlistlabel
-
Text of the directory list title.
- Name: dirlabel
- Switch: -dirlabel
-
Text of the directory entry label.
- Name: acceptlabel
- Switch: -acceptlabel
-
Text of the Accept button label.
- Name: hostlabel
- Switch: -hostlabel
-
Text of the Host button label.
- Name: cancellabel
- Switch: -cancellabel
-
Text of the Cancel button label.
- Name: resetlabel
- Switch: -resetlabel
-
Text of the Reset button label.
- Name: homelabel
- Switch: -homelabel
-
Text of the Home button label.
- Name: uidlabel
- Switch: -uidlabel
-
Text of the user name entry label.
- Name: pwdlabel
- Switch: -pwdlabel
-
Text of the password entry label.
- Name: verify
- Switch: -verify
-
The value is an anonymous array that contains the operators for file verification, normally qw(! -d -w).
BUGS
The -initialfile, -userid, and -password values do not appear in the entry widgets.
Older versions of Net::FTP (for example, the version distributed with Perl 5.6.1), can cause Perl/Tk windows to freeze when changing to a subdirectory of a directory referred to by a symbolic link.
VERSION INFO
Version 0.60.
CREDITS
Robert Kiesling <rkies@cpan.org>, based on Tk::FileSelect.
Persistent login information added by dougw@cpan.org.
Licensed under the same terms as Perl. Refer to the file, "Artistic," for information.
SEE ALSO
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 52:
'=item' outside of any '=over'
- Around line 181:
You forgot a '=back' before '=head1'