there should not be a default value for `$isDir`