private File[] getJpgFiles(File f){
File[] files = f.listFiles(new FilenameFilter(){
@Override
public boolean accept(File dir, String filename) {
return filename.toLowerCase().endsWith(".jpg");
}});
return files;
}
List files in directory with specified type
The example List all 'jpg' files in given directoty:
0 comments:
Post a Comment