file system function for getting list of directories in a directory