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

14
LINES

< > BotCompany Repo | #1030468 // Test FileWatchService (OK)

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (3431L/18K).

1  
!7
2  
3  
cprint {
4  
  transient FileWatchService watchService;
5  
  
6  
  start {
7  
    ownResource(watchService = new FileWatchService);
8  
    File dir = javaxSecretDir();
9  
    watchService.addRecursiveListener(dir, f -> enter {
10  
      print("File change: " + f);
11  
    });
12  
    print("Watching " + dir);
13  
  }
14  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030468
Snippet name: Test FileWatchService (OK)
Eternal ID of this version: #1030468/6
Text MD5: 6f8803fd1b1b5f10db1ec12dc07b242e
Transpilation MD5: b1152ed0d04aa52b67de4a74eb1d7657
Author: stefan
Category: javax / io
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-12-23 01:36:10
Source code size: 302 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 177 / 298
Version history: 5 change(s)
Referenced in: [show references]