4
如果我有一個名爲temp
與以下文件目錄:的Apache VFS resolveFile用正則表達式
a_file1.jpg
a_file2.jpg
b_file1.jpg
b_file2.jpg
這是可能得到的所有文件是這樣的:
VFS.getManager().resolveFile("temp").getChildren();
但是,我真的想do得到a_file1.jpg
和a_file2.jpg
。也許喜歡:
VFS.getManager().resolveFile("temp/a*").getChildren();
但是,這將引發異常:
org.apache.commons.vfs.FileSystemException: Could not list the contents of "temp/a*" because it is not a folder.
因此,沒有人知道如何解決基於與VFS正則表達式的一組文件?
Thanks Mat。 Google通過代碼示例發現此頁面: http://wiki.apache.org/commons/VfsFaq –