FTP Getting permissions?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

FTP Getting permissions?

Post 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?
Post Reply