diff options
Diffstat (limited to 'stdlib/source/library/lux/world/file/watch.lux')
-rw-r--r-- | stdlib/source/library/lux/world/file/watch.lux | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux index eca972ca5..6c1331c4d 100644 --- a/stdlib/source/library/lux/world/file/watch.lux +++ b/stdlib/source/library/lux/world/file/watch.lux @@ -1,6 +1,6 @@ (.using [library - [lux "*" + [lux {"-" all} ["@" target] ["[0]" ffi {"+" import:}] [abstract @@ -74,11 +74,11 @@ (def: .public all Concern - ($_ ..also - ..creation - ..modification - ..deletion - )) + (.all ..also + ..creation + ..modification + ..deletion + )) ) (type: .public (Watcher !) @@ -246,14 +246,14 @@ (list#composite deletions all_deletions)]) [(list) (list) (list)] changes)]] - (in ($_ list#composite - (list#each (|>> product.left [..creation]) creations) - (|> modifications - (list.only (function (_ [path previous_modification current_modification]) - (not (instant#= previous_modification current_modification)))) - (list#each (|>> product.left [..modification]))) - (list#each (|>> [..deletion]) deletions) - ))))) + (in (.all list#composite + (list#each (|>> product.left [..creation]) creations) + (|> modifications + (list.only (function (_ [path previous_modification current_modification]) + (not (instant#= previous_modification current_modification)))) + (list#each (|>> product.left [..modification]))) + (list#each (|>> [..deletion]) deletions) + ))))) ))) (def: .public (mock separator) @@ -400,17 +400,17 @@ (def: (watch_events concern) (-> Concern (List Watch_Event)) - ($_ list#composite - (if (..creation? concern) - (list (as Watch_Event (java/nio/file/StandardWatchEventKinds::ENTRY_CREATE))) - (list)) - (if (..modification? concern) - (list (as Watch_Event (java/nio/file/StandardWatchEventKinds::ENTRY_MODIFY))) - (list)) - (if (..deletion? concern) - (list (as Watch_Event (java/nio/file/StandardWatchEventKinds::ENTRY_DELETE))) - (list)) - )) + (.all list#composite + (if (..creation? concern) + (list (as Watch_Event (java/nio/file/StandardWatchEventKinds::ENTRY_CREATE))) + (list)) + (if (..modification? concern) + (list (as Watch_Event (java/nio/file/StandardWatchEventKinds::ENTRY_MODIFY))) + (list)) + (if (..deletion? concern) + (list (as Watch_Event (java/nio/file/StandardWatchEventKinds::ENTRY_DELETE))) + (list)) + )) (def: .public default (IO (Try (Watcher Async))) |