utility methods moved from DirectoryIndex to ModuleFileIndexImpl to allow UpSource provide their own implementation of DirectoryIndex