filestream - Java How to list files with directory with pattern matcher -


the file structure following:

root  -- [anything]    -- access.log  -- [anything]    -- access.log 

path: /root/*/access.log

thank you.

    directoryscanner scanner = new directoryscanner();     scanner.setincludes(new string[]{"*/access.log"});     scanner.setbasedir(basepath);     scanner.scan();     string[] files = scanner.getincludedfiles(); 

this simplest solution using org.apache.tools.ant.directoryscanner


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -