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

20
LINES

< > BotCompany Repo | #1020401 // CSnippet for #1016871

JavaX fragment (include)

1  
concept CSnippet {
2  
  long snippetID;
3  
  S type;
4  
  S title, md5, transpilationMD5;
5  
  bool isPublic;
6  
  
7  
  File file() { ret snippetDB_textFile(snippetID); }
8  
  S text() { ret loadTextFile(file()); }
9  
  bool hasText() { ret fileExists(file()); }
10  
  void setText(S text) {
11  
    S oldText = text();
12  
    if (eq(text, oldText)) ret;
13  
    thread {
14  
      logStructure(javaxBackupDir("snippet-text-changes.log"), ll(now(), snippetID, type, title, md5, "old", oldText, "new", text));
15  
    }
16  
    saveTextFile(file(), text);
17  
  }
18  
  int textLength() { ret hasText() ? (int) fileSize(file()) : -1; }
19  
  S snippetID() { ret fsI(snippetID); }
20  
}

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: 220 / 600
Version history: 6 change(s)
Referenced in: [show references]