static IVar<S> persistentSecretText(fS persistenceName) { ret new IVar<S>() { File f = secretProgramFile(urlencode(persistenceName)); public synchronized void set(S a) { saveTextFile(f, a); } public synchronized S get() { ret loadTextFile(f); } public synchronized bool has() { ret fileExists(f); } public synchronized void clear() { set(null); } }; }
Began life as a copy of #1009538
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1010571 |
Snippet name: | persistentSecretText |
Eternal ID of this version: | #1010571/3 |
Text MD5: | 5a1c01b7e0f8cd96deb77cd1f455360b |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-21 18:32:49 |
Source code size: | 389 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 417 / 488 |
Version history: | 2 change(s) |
Referenced in: | [show references] |