Fail opening the file if it's not a directory.
const FILE_ONLY_DIRECTORY: FileFlags = FileFlags(O_DIRECTORY);
open(2) and O_DIRECTORY therein