I am working on a script for connecting to an FTP and then download the content.
Now my problem is to detect whether a each item is a folder or a file.
My first idea was to try and use
ftp_chdir, but this would require me to suppress the error using
@, and I don't wish to do this (I don't wish to suppress errors, but instead prefer to handle them correctly).
Is there another way to check if a my items are files or folders?