The following table shows some of the more common directory functions.
||Creates a directory.|
||Deletes a directory.|
||Opens a directory for reading.|
||Reads the contents of an open directory.|
To get a directory listing, use the
opendir() function to open the directory and the
readdir() function to read its contents. Then loop through its contents with a while loop outputting the name of each file and folder.