remove impletation for isDirectory, defaulted to true