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

12
LINES

< > BotCompany Repo | #1003970 // getNewestFile (by modification date)

JavaX fragment (include)

1  
static File getNewestFile(L<File> files) {
2  
  File ff = null;
3  
  long l = 0;
4  
  for (File f : files) {
5  
    long m = f.lastModified();
6  
    if (m > l) {
7  
      l = m;
8  
      ff = f;
9  
    }
10  
  }
11  
  ret ff;
12  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003970
Snippet name: getNewestFile (by modification date)
Eternal ID of this version: #1003970/2
Text MD5: cfd43eab1506696dc2e4b0c60b8893d9
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-07 16:25:40
Source code size: 207 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 603 / 614
Version history: 1 change(s)
Referenced in: [show references]