How do I distinguish files and folders on an FTP server

Posted by soulmerge on Stack Overflow See other posts from Stack Overflow or by soulmerge
Published on 2010-03-03T12:31:01Z Indexed on 2010/03/18 11:21 UTC
Read the original article Hit count: 246

Filed under:
|

I want to list all files on an FTP server using PHP. According to RFC 959 the FTP command LIST is allowed to print arbitrary human-readable information on files/folders, which seems to make it impossible to determine the file type correctly. But how do other FTP clients manage to distinguish files and folders? Is there an unwritten standard or such?

© Stack Overflow or respective owner

Related posts about ftp

Related posts about php