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

6
LINES

< > BotCompany Repo | #1029892 // loadTextFileOrCreateWithRandomID

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

Libraryless. Click here for Pure Java version (2835L/18K).

sS loadTextFileOrCreateWithRandomID(File f) {
  S id = trim(loadTextFile(f));
  if (empty(id))
    saveTextFile(f, id = aGlobalID());
  ret id;
}

Author comment

Began life as a copy of #1028302

download  show line numbers  debug dex  old transpilations   

Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1029892
Snippet name: loadTextFileOrCreateWithRandomID
Eternal ID of this version: #1029892/1
Text MD5: 94781f628ec1f278001aad0eb65b93fd
Transpilation MD5: d6902233252ac82794df9bc065ab5b8c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-28 14:04:25
Source code size: 150 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 127 / 188
Referenced in: [show references]