#navi(contents-page-name): No such page: ST

FrontPage>Swing Tips>ST/Recursive

ST/Recursive

Terai Atsuhiro 2024-02-02 (金) 12:02:25

private void recursiveFiles(File dir, final Vector list){
  String[] contents = dir.list();
  for(int i=0;i<contents.length;i++){
    File sdir = new File(dir, contents[i]);
    if(sdir.isDirectory()){
      recursiveFiles(sdir, list);
    }else if(sdir.getName().toLowerCase().endsWith(".jpg")){
      list.add(sdir);
    }
  }
}