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

11
LINES

< > BotCompany Repo | #1002088 // listFilesWithSuffix

JavaX fragment (include)

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

static L<File> listFilesWithSuffix(S suffix, File dir) {
  ret listFilesWithSuffix(dir, suffix);
}

Author comment

Began life as a copy of #1002085

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002088
Snippet name: listFilesWithSuffix
Eternal ID of this version: #1002088/3
Text MD5: 79dd668f808f1fa92a4ffd2ec5b3c334
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-11-14 23:04:15
Source code size: 326 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 744 / 970
Version history: 2 change(s)
Referenced in: [show references]