For consistency with the File API we should try to replace the word "folder" with "directory" throughout the codebase.