def inotify_init(flags=0):
"""Initializes a new inotify instance and returns a file descriptor
associated with a new inotify event queue.
:param ``INInitFlags`` flags:
Optional flag to control the inotify_init behavior.
"""
fileno = _INOTIFY_INIT1(flags)
if fileno < 0:
errno = ctypes.get_errno()
raise OSError(errno, os.strerror(errno),
'inotify_init1(%r)' % flags)
return fileno
###############################################################################
# Constants copied from sys/inotify.h
#
# See man inotify(7) for more details.
#
评论列表
文章目录