static File makeDirNameUnique_startWithOne(File f) { File orig = f; int n = 1; S name = orig.getName(); f = new File(dirOfFile(orig), name + "." + n); while (f.exists()) f = new File(dirOfFile(orig), name + (++n)); ret f; }
Began life as a copy of #1016338
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1019315 | 
| Snippet name: | makeDirNameUnique_startWithOne (uses .1, .2, ...) | 
| Eternal ID of this version: | #1019315/6 | 
| Text MD5: | ca97fbcc3b391c0ca61acda40767404b | 
| Author: | stefan | 
| Category: | javax / io | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2018-12-14 13:06:08 | 
| Source code size: | 247 bytes / 9 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 530 / 580 | 
| Version history: | 5 change(s) | 
| Referenced in: | [show references] |