Home » » List files in directory with specified type

List files in directory with specified type

Written By MR HARI on Jumat, 30 Agustus 2013 | 15.36

The example List all 'jpg' files in given directoty:

 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;
}


Share this article :

0 komentar:

Posting Komentar

 
Support : Your Link | Your Link | Your Link
Copyright © 2013. Android Center - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger