1 | static File makeDirNameUnique_startWithOne_noDot(File f) { |
2 | File orig = f; |
3 | int n = 1; |
4 | S name = orig.getName(); |
5 | f = new File(dirOfFile(orig), name + n); |
6 | while (f.exists()) |
7 | f = new File(dirOfFile(orig), name + (++n)); |
8 | ret f; |
9 | } |
Began life as a copy of #1019315
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020319 |
Snippet name: | makeDirNameUnique_startWithOne_noDot (uses name1, name2, ...) |
Eternal ID of this version: | #1020319/3 |
Text MD5: | 07250b93afcc5cdbcb6918e5d9bcb8db |
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:37 |
Source code size: | 247 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 281 / 324 |
Version history: | 2 change(s) |
Referenced in: | [show references] |