listDirectory dir returns a list of all entries in dir without
the special entries (. and ..).
The operation may fail with:
HardwareFaultA physical I/O error has occurred.[EIO]InvalidArgumentThe operand is not a valid directory name.[ENAMETOOLONG, ELOOP]isDoesNotExistError The directory does not exist.
[ENOENT, ENOTDIR]isPermissionError The process has insufficient privileges to perform the operation.
[EACCES]System.IO.isFullErrorInsufficient resources are available to perform the operation.[EMFILE, ENFILE]InappropriateTypeThe path refers to an existing non-directory object.[ENOTDIR]