is_directory/1 checks if FilePath is a
directory in which case it is returned. Please read
file(3) for a description of enoent,
eaccess and enotdir. The definition of
the file info record can be found by including file.hrl
from the kernel application, see file(3).