CodeIgniter Forums
FTP class->list_files() - distingushing between folders and files - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: FTP class->list_files() - distingushing between folders and files (/showthread.php?tid=49642)



FTP class->list_files() - distingushing between folders and files - El Forum - 02-27-2012

[eluser]Stefan :: cleverleap.com[/eluser]
Hi,

I just build web service (www.pagesticky.com) allowing people to edit web pages remotely using CI FTP class. When getting list of files from the FTP I would like to distinguish between folder and file so I can map appropriate functions for it. Does somebody know how to distinguish between folder and file when using FTP->list_files()?




FTP class->list_files() - distingushing between folders and files - El Forum - 02-27-2012

[eluser]CroNiX[/eluser]
list_files() is an alias for ftp_nlist(). There are some solutions in the user comments in the docs to do that.