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: 723 / 962
Referenced in: #1002088 - listFilesWithSuffix
#1002427 - Accellerating 629 (SPIKE)
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#3000382 - Answer for ferdie (>> t = 1, f = 0)