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

5
LINES

< > BotCompany Repo | #1034687 // textFileAsVarWithNotify [note: doesn't watch the file for changes]

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

Libraryless. Click here for Pure Java version (6579L/37K).

1  
static IVarWithNotify<S> textFileAsVarWithNotify(File file) {
2  
  ret new TypedVirtualVar<S>(S,
3  
    -> loadTextFile(file),
4  
    text -> saveTextFile(file, text));
5  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1034687
Snippet name: textFileAsVarWithNotify [note: doesn't watch the file for changes]
Eternal ID of this version: #1034687/3
Text MD5: 2551af30e0c0e4be7c3e90caac268201
Transpilation MD5: 588297618dbaa1a3496d95d681d1497c
Author: stefan
Category: javax / gazelle 22
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-03 14:26:20
Source code size: 165 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 176 / 231
Version history: 2 change(s)
Referenced in: [show references]