在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):kolmodin/hinotify开源软件地址(OpenSource Url):https://github.com/kolmodin/hinotify开源编程语言(OpenSource Language):Haskell 93.5%开源软件介绍(OpenSource Introduction):hinotify: inotify for HaskellAbouthinotify, 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 See example code in the Newshinotify 0.3.7
hinotify 0.3.2
hinotify 0.3.1
hinotify 0.3
hinotify 0.2
hinotify 0.1 : Initial release APIThe 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 :: 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
inotify
[Open,Close,Access,Modify,Move]
home
print
print wd
putStrLn "Listens to your home directory. Hit enter to terminate."
getLine
removeWatch wd DownloadThe code is available via the homepage, and via darcs:
The API is available online. I'm most grateful for feedback on the API, and what else you might have to suggest. AuthorLennart Kolmodin
LegalThis software is released under a BSD-style license. See LICENSE for more details. Copyright © 2007-2012 Lennart Kolmodin |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论