hinotify-0.4: Haskell binding to inotify
Copyright(c) Lennart Kolmodin 2006-2012
LicenseBSD3
Maintainerkolmodin@gmail.com
Stabilityexperimental
Portabilityhc portable, linux only
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.INotify

Description

A Haskell binding to INotify. See http://www.kernel.org/pub/linux/kernel/people/rml/inotify/ and man inotify.

Use initINotify to get a INotify, then use addWatch to add a watch on a file or directory. Select which events you're interested in with EventVariety, which corresponds to the Event events.

Use removeWatch once you don't want to watch a file any more.

Documentation

withINotify :: (INotify -> IO a) -> IO a #

data INotify #

Instances

Instances details
Eq INotify # 
Instance details

Defined in System.INotify

Methods

(==) :: INotify -> INotify -> Bool #

(/=) :: INotify -> INotify -> Bool #

Show INotify # 
Instance details

Defined in System.INotify

data WatchDescriptor #

Instances

Instances details
Eq WatchDescriptor # 
Instance details

Defined in System.INotify

Show WatchDescriptor # 
Instance details

Defined in System.INotify

data Event #

Constructors

Accessed

A file was accessed. Accessed isDirectory file

Modified

A file was modified. Modified isDirectory file

Attributes

A files attributes where changed. Attributes isDirectory file

Closed

A file was closed. Closed isDirectory file wasWriteable

Opened

A file was opened. Opened isDirectory maybeFilePath

MovedOut

A file was moved away from the watched dir. MovedFrom isDirectory from cookie

MovedIn

A file was moved into the watched dir. MovedTo isDirectory to cookie

MovedSelf

The watched file was moved. MovedSelf isDirectory

Fields

Created

A file was created. Created isDirectory file

Deleted

A file was deleted. Deleted isDirectory file

DeletedSelf

The file watched was deleted.

Unmounted

The file watched was unmounted.

QOverflow

The queue overflowed.

Ignored 
Unknown FDEvent 

Instances

Instances details
Eq Event # 
Instance details

Defined in System.INotify

Methods

(==) :: Event -> Event -> Bool #

(/=) :: Event -> Event -> Bool #

Show Event # 
Instance details

Defined in System.INotify

Methods

showsPrec :: Int -> Event -> ShowS #

show :: Event -> String #

showList :: [Event] -> ShowS #

data Cookie #

Instances

Instances details
Eq Cookie # 
Instance details

Defined in System.INotify

Methods

(==) :: Cookie -> Cookie -> Bool #

(/=) :: Cookie -> Cookie -> Bool #

Ord Cookie # 
Instance details

Defined in System.INotify

Show Cookie # 
Instance details

Defined in System.INotify