[Q]How do one determine if a ftp link is to a directory or a file
?
Avi Bryant
avi at beta4.com
Tue Jul 29 08:41:12 UTC 2003
On Tue, 29 Jul 2003, Karl Ramberg wrote:
> Just looking at the returned ftp entry answers these strings, first one
> a file,
> second a directory:
>
>
> 'lrwxrwxrwx 1 1137 1100 36 Apr 12 07:12
> SqueakV3.sources.gz -> ../sources_files/SqueakV3.sources.gz'
> 'lrwxrwxrwx 1 0 1 5 Apr 24 11:15 pub -> .pub1'
>
>
>
> Do one have to follow the link and the see if it returns a directory or
> file, or can
> one get the info just from the returned string ?
The obvious clue there is the size, which is 0 for the directory and not
for the file. Not a sure indication but might be helpful... ?
More information about the Squeak-dev
mailing list
|