1 | static java.util.Timer watchFile(final File f, int interval, final Runnable onChange) {
|
2 | ret doEvery(interval, new Runnable {
|
3 | FileStatus status = fileStatus(f); |
4 | |
5 | public void run {
|
6 | FileStatus s = fileStatus(f); |
7 | if (neq(s, status)) {
|
8 | status = s; |
9 | pcallF(onChange); |
10 | } |
11 | } |
12 | }); |
13 | } |
Began life as a copy of #1013001
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: | #1015626 |
| Snippet name: | watchFile |
| Eternal ID of this version: | #1015626/3 |
| Text MD5: | e32ee22e54071c458d665bda514dcb1b |
| Author: | stefan |
| Category: | javax / i.o. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-05-20 12:20:10 |
| Source code size: | 336 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 549 / 579 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |