concept CSnippet {
long snippetID;
S type;
S title, md5, transpilationMD5;
bool isPublic;
File file() { ret snippetDB_textFile(snippetID); }
S text() { ret loadTextFile(file()); }
bool hasText() { ret fileExists(file()); }
void setText(S text) {
S oldText = text();
if (eq(text, oldText)) ret;
thread {
logStructure(javaxBackupDir("snippet-text-changes.log"), ll(now(), snippetID, type, title, md5, "old", oldText, "new", text));
}
saveTextFile(file(), text);
}
int textLength() { ret hasText() ? (int) fileSize(file()) : -1; }
S snippetID() { ret fsI(snippetID); }
}download show line numbers debug dex old transpilations
Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1020401 |
| Snippet name: | CSnippet for #1016871 |
| Eternal ID of this version: | #1020401/7 |
| Text MD5: | e6f821449f9e4a25651adecfb4b33819 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-07-08 22:31:31 |
| Source code size: | 637 bytes / 20 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 675 / 1058 |
| Version history: | 6 change(s) |
| Referenced in: | [show references] |