Mar*_*ope 5 java apache-commons-vfs
如果我有一个temp
使用以下文件调用的目录:
a_file1.jpg
a_file2.jpg
b_file1.jpg
b_file2.jpg
Run Code Online (Sandbox Code Playgroud)
有可能得到这样的所有文件:
VFS.getManager().resolveFile("temp").getChildren();
Run Code Online (Sandbox Code Playgroud)
但是,我真正想做的是得到a_file1.jpg
和a_file2.jpg
.也许喜欢:
VFS.getManager().resolveFile("temp/a*").getChildren();
Run Code Online (Sandbox Code Playgroud)
但这引发了一个例外:
org.apache.commons.vfs.FileSystemException: Could not list the contents of "temp/a*" because it is not a folder.
Run Code Online (Sandbox Code Playgroud)
那么,有没有人知道如何基于VFS的正则表达式解析一组文件?