Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: GetChapter 19
Win32 Modules and Extensions
Next: Reference: Mkdir
 

List

$FTP->List([pattern, listmode])
$FTP->Ls([pattern, listmode])
$FTP->Dir([pattern, listmode])

Returns a list containing the files found in the current directory, matching the given pattern, if specified. The content of the returned list depends on the listmode parameter, which can have the following values:

1 (default)

The list contains the names of the files found.

2

The list contains seven values for each file:

  • The file name

  • The DOS short file name, a.k.a. 8.3

  • The size

  • The attributes

  • The creation time

  • The last access time

  • The last modified time

3

The list contains a reference to a hash for each found file. Each hash contains the following key/value pairs:

name => file name
altname => DOS short file name, a.k.a. 8.3
size => size
attr => attributes
ctime => creation time
atime => last access time
mtime => last modified time

All times are reported as strings of the following format: second, hour, minute, day, month, year. For example:

$file->{'mtime'} == "0,10,58,9,12,1996"
# stands for 09 Dec 1996 at 10:58:00


Previous: Reference: GetPerl in a NutshellNext: Reference: Mkdir
Reference: GetBook IndexReference: Mkdir



Banner.Novgorod.Ru