Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1002085 // deleteAllFilesWithSuffix

JavaX fragment (include)

static L<File> deleteAllFilesWithSuffix(File dir, S suffix) {
  new L<File> deleted;
  for (File f : listFiles(dir))
    if (!f.isDirectory() && endsWithIgnoreCase(f.getName(), suffix)) {
      f.delete();
      deleted.add(f);
    }
  ret deleted;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1002085
Snippet name: deleteAllFilesWithSuffix
Eternal ID of this version: #1002085/1
Text MD5: 1203762604c4a6985da8da5db66788d4
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-11-28 14:44:18
Source code size: 258 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 722 / 960
Referenced in: [show references]