in reply to Net::FTP file type and attributes
Not really.
Net::FTP supports a command called dir() which can give you a detailed list of remote entities, that clearly indicate whether the entity is a directory or a file. I tested with the following code, local win2k, remote unix (trust that you will get a similar list if remote is non-unix):
use Data::Dumper; use Net::FTP; $ftp = Net::FTP->new("blah", Debug => 0) or die "Cannot connect: $@"; + $ftp->login("foo",'bar') or die "Cannot login ", $ftp->message; my @list = $ftp->dir(); print Dumper(\@list); $ftp->quit;
I got something like (only a portion):
'drwxr-xr-x 7 leinbd aagdev 512 Oct 17 18:06 leinb +d', 'drwxr-xr-x 11 lois aagdev 1024 Nov 14 14:04 lois' +, 'drwx------ 2 root system 512 Nov 10 15:41 lost+ +found', 'drwxr-xr-x 2 maynec aagdev 512 Nov 20 10:05 mayne +c', 'drwxr-xr-x 10 nanayn aagdev 512 Oct 07 09:52 nanay +n', 'drwxr-xr-x 5 root system 512 Nov 10 15:41 netin +st',
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Net::FTP file type and attributes
by fedelman (Novice) on Jan 22, 2004 at 21:17 UTC | |
by flyingmoose (Priest) on Jan 23, 2004 at 01:55 UTC | |
|
Re: Re: Net::FTP file type and attributes
by Anonymous Monk on Feb 21, 2004 at 02:49 UTC |