Page 1 of 1

FTP Getting permissions?

Posted: Thu Jun 14, 2007 6:01 pm
by alex.barylski
Edit3 It appears as though I have to use the unformatted ftp_rawlist.

Edit2: While I solved the directory mystery, what about permissions? Anyone know how ans if this is possible using the PHP API?

Edit: Just occured to me, filesizes for folders are likely -1 or something to indicate it's a folder :)

How do you determine if the list of objects returned by ftp_nlist are either:

1) Files
2) Folders
3) Symlinks

There doesn't appear to be any function in PHP API to determine this, am I missing something or am I going to have to create each object locally and run a is_dir, is_file, is_link functions and hope that URL's are supported?

Is there any other way?