File: README.md

package info (click to toggle)
haskell-hinotify 0.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 112 kB
  • sloc: haskell: 245; makefile: 2
file content (49 lines) | stat: -rw-r--r-- 1,290 bytes parent folder | download
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
hinotify: inotify for Haskell
=============================

[![CI](https://github.com/haskell-fswatch/hinotify/actions/workflows/ci.yml/badge.svg)](https://github.com/haskell-fswatch/hinotify/actions/workflows/ci.yml)

About
-----

This package provides bindings to [inotify](http://www.kernel.org/pub/linux/kernel/people/rml/inotify/), which has been part of the Linux kernel since 2.6.13.

The `inotify` subsystem provides file system event notifications. Simply add a watcher to a file or directory and you get events when it is accessed, modified, etc.

News
----

See [CHANGELOG.md](./CHANGELOG.md).

API
---

The API basically consists of:

```haskell
initINotify :: IO INotify

addWatch :: INotify
         -> [EventVariety]   -- different events to listen on
         -> RawFilePath      -- file/directory to watch
         -> (Event -> IO ()) -- event handler callback
         -> IO WatchDescriptor

removeWatch :: WatchDescriptor -> IO ()
```

See this [example](./examples/simple/simple.hs) or the [docs](https://hackage.haskell.org/package/hinotify/docs/System-INotify.html).

Author
------

Lennart Kolmodin

`kolmodin at gmail.com`

Legal
-----

This software is released under a BSD-style license. See LICENSE for more details.

Copyright © 2007-2012 Lennart Kolmodin