How to search file by file name in project's root directory?
I get file name without path information,just like "index.jsp". I want to search all files with this name in project's root directory,just like CtrlShiftN. Is there api to implement this function in Open API?
请先登录再写评论。
Just for the sake of anybody else wo will search the forum for an answer:
Look at the methods in PsiShortNamesCache.
You get this cache by using
PsiManager.getInstance(project).getShortNamesCache()
Current version of PsiManager doesn't have getShortNamesCache() method.
What is currently the right way to find files by name?
com.intellij.psi.search.PsiShortNamesCache#getFilesByName