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

11
LINES

< > BotCompany Repo | #1016881 // pred_fileSizeChanged - predicate that becomes true once when file size changes

JavaX fragment (include)

1  
static F0<Bool> pred_fileSizeChanged(final File f) {
2  
  ret new F0<Bool>() {
3  
    long lastSize = fileSize(f);
4  
    
5  
    public Bool get() {
6  
      long size = fileSize(f);
7  
      if (size == lastSize) false;
8  
      ret true with lastSize = size;
9  
    }
10  
  };
11  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016881
Snippet name: pred_fileSizeChanged - predicate that becomes true once when file size changes
Eternal ID of this version: #1016881/2
Text MD5: 1e49df40b1c2a044fbd4bf11e87c2112
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-06 16:10:14
Source code size: 263 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 252 / 290
Version history: 1 change(s)
Referenced in: [show references]