aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/world/file/watch.lux
blob: 3cf4370566792b057e9c04fb2994c4c6a56f6898 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
(.using
 [library
  [lux "*"
   ["$" documentation {"+" documentation:}]
   ["@" target]
   [control
    ["<>" parser
     ["<[0]>" code]]]
   [data
    ["[0]" text {"+" \n}
     ["%" format {"+" format}]]]
   [macro
    ["[0]" template]]]]
 [\\library
  ["[0]" /]])

(documentation: /.Concern
  "A particular concern to watch-out for.")

(documentation: /.also
  ""
  [(also left right)])

(documentation: (/.Watcher !)
  "Machinery for watching a file-system for changes to files and directories.")

(documentation: /.polling
  (format "A simple watcher that works for any file-system."
          "Polls files and directories to detect changes.")
  [(polling fs)])

(documentation: /.mock
  (format "A fake/emulated watcher."
          \n "Must be given a path separator for the file-system.")
  [(mock separator)])

(for @.jvm (these (documentation: /.default
                    "The default watcher for the default file-system."))
     (these))

(.def: .public documentation
  (.List $.Module)
  (`` (`` ($.module /._
                    ""
                    [..Concern
                     ..also
                     ..Watcher
                     ..polling
                     ..mock
                     ($.default /.creation)
                     ($.default /.creation?)
                     ($.default /.modification)
                     ($.default /.modification?)
                     ($.default /.deletion)
                     ($.default /.deletion?)
                     ($.default /.all)
                     ($.default /.not_being_watched)
                     ($.default /.cannot_poll_a_non_existent_directory)
                     (~~ (for @.jvm (~~ (these ..default))
                              (~~ (these))))]
                    []))))