Libraryless. Click here for Pure Java version (4647L/26K).
static File makeFileNameUnique_beforeExtension(File f) { File orig = f; int n = 0; while (f.exists()) f = appendToFileBaseName(orig, "." + ++n); ret f; }
Began life as a copy of #1015318
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033396 |
Snippet name: | makeFileNameUnique_beforeExtension |
Eternal ID of this version: | #1033396/2 |
Text MD5: | 007aa4bd66cf68dec70481a7d653b7ab |
Transpilation MD5: | 6a5e82d73d9f506ac67e59b65bc90154 |
Author: | stefan |
Category: | javax / io |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-27 01:53:19 |
Source code size: | 171 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 153 / 213 |
Version history: | 1 change(s) |
Referenced in: | [show references] |