Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java listfiles filter

File dir = new File("/users/blah/dirname");
File[] files = dir.listFiles(new FilenameFilter() {
    public boolean accept(File dir, String name) {
        return name.toLowerCase().endsWith(".txt");
    }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #listfiles #filter
ADD COMMENT
Topic
Name
7+7 =