The hinotify package

[ Tags: bsd3, library, system ] [ Propose Tags ]

This library provides a wrapper to the Linux Kernel's inotify feature, allowing applications to subscribe to notifications when a file is accessed or modified.

[Skip to Readme]


Versions 0.1, 0.2, 0.3, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8,, 0.3.9
Dependencies base (<5), containers, directory, unix [details]
License BSD3
Author Lennart Kolmodin
Maintainer Lennart Kolmodin <>
Category System
Home page
Uploaded Sun Dec 6 14:13:17 UTC 2009 by LennartKolmodin
Distributions Arch:0.3.9, Debian:, Fedora:0.3.9, FreeBSD:, LTSHaskell:0.3.9, NixOS:0.3.9, Stackage:0.3.9, Tumbleweed:0.3.9
Downloads 41113 total (2092 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI





Choose the new smaller, split-up base package.


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees

Readme for hinotify-0.3.1

[back to package description]
% hinotify: inotify for Haskell
% Lennart Kolmodin <>
% December 26, 2007-2009


hinotify, a library to [inotify] which has been part of the Linux kernel
since 2.6.13.

inotify provides file system event notification, simply add a watcher to
a file or directory and get an event when it is accessed or modified.

This module is named `hinotify`.

See example code in the `examples` directory, distributed with the source



**hinotify 0.3.1**
:   * Use `inotify.h` from `glibc` rather than from the linux headers, as
      recommended upstream.

**hinotify 0.3**
:   * Compiles with GHC 6.12, GHC 6.10.4, GHC 6.8.2 and GHC 6.6.1

**hinotify 0.2**
:   * Updates to the API
        - Function names is now in semiCamelCase
        - Restructure event parameters to make it more consistent
    * Small test suit in `tests/`
    * Compiles with GHC 6.8.2 and GHC 6.6.1
    * Requires Cabal 1.2

**hinotify 0.1**
:   Initial release


The API basically consists of:

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

A sample program:

    import System.Directory
    import System.IO

    import System.INotify

    main :: IO ()
    main = do
        inotify <- initINotify
        print inotify
        home <- getHomeDirectory
        wd <- addWatch
        print wd
        putStrLn "Listens to your home directory. Hit enter to terminate."
        removeWatch inotify wd


The code is available via the [homepage], and via darcs:

    darcs get --partial

The [API] is available online.

I'm most grateful for feedback on the API, and what else you might have to


Lennart Kolmodin

`kolmodin at`


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

Copyright &copy; 2007 Lennart Kolmodin