How to iterate through all files by mask in Java? For example, there's a mask with wild cards like
D:\work\mytestfolder\temp\*.txt
Need to get a collection (or iterator or whatever else) of all *.txt
files in the directory above.
Some more details. Want to process a number of files and it's convenient here to define a set of masks like those shown above. The GLOBE syntax (https://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystem.html#getPathMatcher(java.lang.String)) looks very helpful and would desirably be supported.