{ } qjs-modules

inotify

Source: lib/inotify.js (pure JS) — default export: inotify

Linux inotify filesystem-watch bindings plus a class wrapper.

Exports

ExportArgsKindDescription
inotify_init(flags=0)0–1functionCreates an inotify instance; returns its fd.
inotify_add_watch(fd, pathname, mask=IN_ALL_EVENTS)2–3functionAdds/updates a watch; returns a watch descriptor.
inotify_rm_watch(fd, wd)2functionRemoves a watch.
inotify_close(fd)1functionCloses an inotify fd.
inotify—classObject-oriented wrapper around the above. (default export)

Also re-exports the IN_* event-mask constants (e.g. IN_CREATE, IN_MODIFY, IN_DELETE, IN_ALL_EVENTS).

Export list

Generated by utilities/doc-api.js from the inotify dump of utilities/api-surface.sh: 48 members. Edit the text above this block, not the block.

Functions: inotify_add_watch(), inotify_close(), inotify_init(), inotify_rm_watch()

Values: IN_ACCESS = 1, IN_ALL_EVENTS = 4095, IN_ATTRIB = 4, IN_CLOSE = 24, IN_CLOSE_NOWRITE = 16, IN_CLOSE_WRITE = 8, IN_CREATE = 256, IN_DELETE = 512, IN_DELETE_SELF = 1024, IN_DONT_FOLLOW = 33554432, IN_EXCL_UNLINK = 67108864, IN_IGNORED = 32768, IN_ISDIR = 1073741824, IN_MASK_ADD = 536870912, IN_MODIFY = 2, IN_MOVE = 192, IN_MOVED_FROM = 64, IN_MOVED_TO = 128, IN_MOVE_SELF = 2048, IN_NONBLOCK = 2048, IN_ONESHOT = -2147483648, IN_ONLYDIR = 16777216, IN_OPEN = 32, IN_Q_OVERFLOW = 16384, IN_UNMOUNT = 8192, inotify_event_size = 16

default

class, constructible

  • methods: add(), close(), onclose(), onerror(), onread(), remove(), watch()

inotify

class, constructible

  • methods: add(), close(), onclose(), onerror(), onread(), remove(), watch()