https://github.com/mopemope/watchdog
Simple Filesystem Event Monitoring
https://github.com/mopemope/watchdog
Last synced: 5 months ago
JSON representation
Simple Filesystem Event Monitoring
- Host: GitHub
- URL: https://github.com/mopemope/watchdog
- Owner: mopemope
- Created: 2012-03-08T11:03:54.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-03-08T11:06:44.000Z (almost 14 years ago)
- Last Synced: 2025-03-15T10:14:08.255Z (10 months ago)
- Language: Clojure
- Homepage:
- Size: 89.8 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# watchdog
Simple Filesystem Events Monitoring
## Installation
-------------
(defproject your-project "0.0.1-SNAPSHOT"
:description "descriptions for your project"
:dependencies [[org.clojars.mopemope/watchdog "0.0.1"]
...]
...)
## Usage
(use 'watchdog))
(set-interval (* 1000))
;; watch-start [pathes handler & extentions]
(watch-start "./"
(fn [files]
(do
(println "create" (:create files))
(println "modify" (:modify files))
(println "delete" (:delete files)))))
;; watch only ".clj" and ".java" files
(watch-start ["./" "your-path1" "your-path2]
(fn [files]
(do
(println "create" (:create files))
(println "modify" (:modify files))
(println "delete" (:delete files)))) [#".*\.clj" #".*\.java"])
## File Event Data
{:create [], :modify [#], :delete []}
## License
Copyright (C) 2012 Yutaka Matsubara
Distributed under the Eclipse Public License, the same as Clojure.