Liking cljdoc? Tell your friends :D

puppetlabs.trapperkeeper.services.watcher.filesystem-watch-core


all-typesclj

source

clojurizeclj

(clojurize event watched-path)

Inputs: [event :- WatchEvent watched-path :- Path] Returns: Event

Takes the Java WatchEvent and the watchable Java Path that the event occurred within and creates a Clojure map to represent the Event throughout the system. The watched-path key is the registered watchable, the changed-path the relative path to what changed, and the full path is the absolute path to the changed event (watched-path + changed-path).

Inputs: [event :- WatchEvent watched-path :- Path]
Returns: Event

Takes the Java WatchEvent and the watchable Java Path that the event
occurred within and creates a Clojure map to represent the Event
throughout the system. The watched-path key is the registered watchable,
the changed-path the relative path to what changed, and the full path is
the absolute path to the changed event (watched-path + changed-path).
sourceraw docstring

create-watcherclj

(create-watcher)
(create-watcher {:keys [recursive] :as options})
source

event-type-mappingsclj

source

filter-eventsclj

(filter-events callback-entry events)
source

process-events!clj

(process-events! watcher events)

Inputs: [watcher :- (schema/protocol Watcher) events :- [Event]]

Process for side effects any events that occurred for watcher's watch-key

Inputs: [watcher :- (schema/protocol Watcher) events :- [Event]]

Process for side effects any events that occurred for watcher's watch-key
sourceraw docstring

retrieve-eventsclj

(retrieve-events watcher)

Inputs: [watcher :- (schema/protocol Watcher)] Returns: [Event]

Blocks until an event the watcher is concerned with has occurred. Will then poll for a new event, waiting at least window-min for a new event to occur. Will continue polling for as long as there are new events that occur within window-min, or the window-max time limit has been exceeded.

Inputs: [watcher :- (schema/protocol Watcher)]
Returns: [Event]

Blocks until an event the watcher is concerned with has occurred. Will then
poll for a new event, waiting at least `window-min` for a new event to
occur. Will continue polling for as long as there are new events that occur
within `window-min`, or the `window-max` time limit has been exceeded.
sourceraw docstring

validate-watch-options!clj

(validate-watch-options! options)

Validate that the options supplied include a valid Boolean value for key :recursive.

Validate that the options supplied include a valid Boolean value for key :recursive.
sourceraw docstring

watch!clj

(watch! watcher shutdown-fn stopped?)

Inputs: [watcher :- (schema/protocol Watcher) shutdown-fn :- IFn stopped? :- (schema/atom schema/Bool)] Returns: Future

Creates and returns a future. Processes events for the passed in watcher within the context of that future. The future will continue until the underlying WatchService is closed, or the future is interrupted.

Inputs: [watcher :- (schema/protocol Watcher) shutdown-fn :- IFn stopped? :- (schema/atom schema/Bool)]
Returns: Future

Creates and returns a future. Processes events for the passed in watcher within the context of that future.
The future will continue until the underlying WatchService is closed, or the future is interrupted.
sourceraw docstring

watch-key->eventsclj

(watch-key->events watch-key)

Inputs: [watch-key :- WatchKey] Returns: [Event]

Inputs: [watch-key :- WatchKey]
Returns: [Event]
sourceraw docstring

watch-new-directories!clj

(watch-new-directories! events watcher)

Inputs: [events :- [Event] watcher :- (schema/protocol Watcher)]

Given an initial set of events and a watcher, identify any events that represent the creation of a directory and register them with the watch service. If no events are directory creations, nothing is registered.

Inputs: [events :- [Event] watcher :- (schema/protocol Watcher)]

Given an initial set of events and a watcher, identify any events that
represent the creation of a directory and register them with the watch service.
If no events are directory creations, nothing is registered.
sourceraw docstring

window-maxclj

source

window-minclj

source

window-unitsclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close