How to filter files at the source itself in Java? I want to know if there is any file-system level filter available which takes in a regex and returns only matching results.
I know there is FileFilter
interface but, this does post filtering after getting all the files under a directory when passed to listFiles()
if I'm not wrong.