tcp wrote in php

help

is there anyway that I can return a list of files in a directoiry within the ftp functions, and have it check if it's a directory, and if it is a directory, to show a specific link, or if its not a dir, and just a regular file, to just display it as a direct file access?