@@ -14,6 +14,9 @@ coverage](https://codecov.io/gh/r-lib/watcher/graph/badge.svg)](https://app.code
1414
1515Watch the File System for Changes
1616
17+ [ ![ Ask
18+ DeepWiki] ( https://deepwiki.com/badge.svg )] ( https://deepwiki.com/r-lib/watcher )
19+
1720R binding for [ libfswatch] ( https://emcrisostomo.github.io/fswatch/ ) , a
1821file system monitoring library. This uses an optimal event-driven API
1922for each platform:
7982# > start: function ()
8083# > stop: function ()
8184# > Private:
82- # > path: /tmp/RtmpslHgGB/watcher-example
85+ # > path: /var/folders/38/lgkw9s3d5tn626g4z2r11bzm0000gp/T//RtmpFm ...
8386# > running: FALSE
8487# > watch: externalptr
8588w $ start()
@@ -89,19 +92,20 @@ file.create(file.path(dir, "newfile"))
8992file.create(file.path(dir , " anotherfile" ))
9093# > [1] TRUE
9194later :: run_now(1 )
92- # > [1] "/tmp/RtmpslHgGB/watcher-example/newfile"
93- # > [1] "/tmp/RtmpslHgGB/watcher-example/anotherfile"
95+ # > [1] "/private/var/folders/38/lgkw9s3d5tn626g4z2r11bzm0000gp/T/RtmpFmlhtZ/watcher-example"
96+ # > [2] "/private/var/folders/38/lgkw9s3d5tn626g4z2r11bzm0000gp/T/RtmpFmlhtZ/watcher-example/newfile"
97+ # > [3] "/private/var/folders/38/lgkw9s3d5tn626g4z2r11bzm0000gp/T/RtmpFmlhtZ/watcher-example/anotherfile"
9498
9599newfile <- file(file.path(dir , " newfile" ), open = " r+" )
96100cat(" hello" , file = newfile )
97101close(newfile )
98102later :: run_now(1 )
99- # > [1] "/tmp/RtmpslHgGB /watcher-example/newfile"
103+ # > [1] "/private/var/folders/38/lgkw9s3d5tn626g4z2r11bzm0000gp/T/RtmpFmlhtZ /watcher-example/newfile"
100104
101105file.remove(file.path(dir , " newfile" ))
102106# > [1] TRUE
103107later :: run_now(1 )
104- # > [1] "/tmp/RtmpslHgGB /watcher-example/newfile"
108+ # > [1] "/private/var/folders/38/lgkw9s3d5tn626g4z2r11bzm0000gp/T/RtmpFmlhtZ /watcher-example/newfile"
105109
106110w $ stop()
107111unlink(dir , recursive = TRUE , force = TRUE )
0 commit comments