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

6
LINES

< > BotCompany Repo | #1034638 // createOrRemoveFile

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

Libraryless. Click here for Pure Java version (5145L/28K).

svoid createOrRemoveFile(File f, bool create) {
  if (create) {
    if (!fileExists(f)) touchFile(f);
  } else if (fileExists(f))
    removeFile(f);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034638
Snippet name: createOrRemoveFile
Eternal ID of this version: #1034638/1
Text MD5: e94ab075afa34248c889475e6ea09c2c
Transpilation MD5: ff835a488341409934404fe4b90a6d8a
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-25 22:15:27
Source code size: 155 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 158 / 230
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)