How to find files that match a wildcard string in Java?

前端 未结 16 1118
慢半拍i
慢半拍i 2020-11-22 10:52

This should be really simple. If I have a String like this:

../Test?/sample*.txt

then what is a generally-accepted way to get a list of fil

16条回答
  •  青春惊慌失措
    2020-11-22 11:19

    Implement the JDK FileVisitor interface. Here is an example http://wilddiary.com/list-files-matching-a-naming-pattern-java/

提交回复
热议问题