accepts a directory path as input, reads the directory, and outputs the directory entries.
Path name to the directory.
Pair of the path name and either
if the read was successful, or
if an error occurred.