Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1021041 // numberFileNameNotUsedInDir_startingWith2

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (42L/1K/2K).

static S numberFileNameNotUsedInDir_startingWith2(File dir) {
  int n = 1;
  File f;
  do {
    f = new File(dir, str(++n));
  } while (f.exists());
  ret f.getName();
}

Author comment

Began life as a copy of #1021040

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: #1021041
Snippet name: numberFileNameNotUsedInDir_startingWith2
Eternal ID of this version: #1021041/1
Text MD5: cfdfbaa463715e825b549ffeacb011ff
Transpilation MD5: a60ca92898931e2582eb4b23b781aade
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-19 17:09:09
Source code size: 176 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 271 / 347
Referenced in: [show references]