Mark directory as excluded from BulkFileListener
Answered
I want to mark certain directories as excluded from BulkFileListener, I attempted to use `ModuleRootModificationUtil.updateExcludedFolders();` but I'm not sure how to determine the module and content root of the files.
Please sign in to leave a comment.
Module: Module module = ModuleUtilCore.findModuleForFile(virtualFile, project);
Content Root: ProjectRootManager.getInstance(module.getProject()).getFileIndex().getContentRootForFile(virtualFile)
Ref https://jetbrains.org/intellij/sdk/docs/reference_guide/project_model/module.html
Thanks for the response. I think I considered something along those lines but got stuck because I couldn't determine the project that the file belongs to.