!636 !standard functions main { psvm { File javax = new File(System.getProperty("user.home"), ".javax"); long now = System.currentTimeMillis(); for (File dir : javax.listFiles()) { if (dir.isDirectory() && Pattern.compile("\\d+").matcher(dir.getName()).matches()) { Long time = Long.parseLong(dir.getName()); System.out.println("Age: " + (now-time)); } } } }
Snippet is not live.
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #2000473 | 
| Snippet name: | Find old cache files (~.javax) | 
| Eternal ID of this version: | #2000473/1 | 
| Text MD5: | 017f09ce9947e7bf41b6f6ee5a4d78df | 
| Author: | stefan | 
| Category: | |
| Type: | New Tinybrain snippet | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2015-07-31 00:50:44 | 
| Source code size: | 422 bytes / 15 lines | 
| Pitched / IR pitched: | No / Yes | 
| Views / Downloads: | 860 / 178 | 
| Referenced in: | [show references] |