static File makeFileNameUnique(File f) { File orig = f; int n = 0; while (f.exists()) f = new File(dirOfFile(orig), orig.getName() + "." + ++n); ret f; }
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: | #1015318 |
Snippet name: | makeFileNameUnique |
Eternal ID of this version: | #1015318/1 |
Text MD5: | 23dc5e1fa6d7ca6b5295d748872cd67f |
Author: | stefan |
Category: | javax / io |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-12 22:33:44 |
Source code size: | 171 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 386 / 419 |
Referenced in: | [show references] |