Libraryless. Click here for Pure Java version (5143L/28K).
1 | static File makeFileNameUnique_beforeExtension_startWith1_noDot(File f) { |
2 | File orig = f; |
3 | int n = 1; |
4 | do { |
5 | f = appendToFileBaseName(orig, str(n++)); |
6 | } while (f.exists()); |
7 | ret f; |
8 | } |
Began life as a copy of #1033396
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033850 |
Snippet name: | makeFileNameUnique_beforeExtension_startWith1_noDot |
Eternal ID of this version: | #1033850/3 |
Text MD5: | 1710d589e24c2bf4cbb31df84b03aab5 |
Transpilation MD5: | f6664837458a2b0f3223c1b24c8be914 |
Author: | stefan |
Category: | javax / io |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-07 01:24:40 |
Source code size: | 198 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 140 / 209 |
Version history: | 2 change(s) |
Referenced in: | [show references] |