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?

3 comments
Comment actions Permalink

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()

0
Comment actions Permalink

Current version of PsiManager doesn't have getShortNamesCache() method.
What is currently the right way to find files by name?

0
Comment actions Permalink

com.intellij.psi.search.PsiShortNamesCache#getFilesByName

0

Please sign in to leave a comment.