Function: inotify-valid-p
inotify-valid-p is a function defined in inotify.c.
Signature
(inotify-valid-p WATCH-DESCRIPTOR)
Documentation
Check a watch specified by its WATCH-DESCRIPTOR.
WATCH-DESCRIPTOR should be an object returned by inotify-add-watch.
A watch can become invalid if the file or directory it watches is
deleted, or if the watcher thread exits abnormally for any other
reason. Removing the watch by calling inotify-rm-watch also makes
it invalid.
Source Code
// Defined in /usr/src/emacs/src/inotify.c
{
if (! valid_watch_descriptor (watch_descriptor))
return Qnil;
Lisp_Object tail = assoc_no_quit (XCAR (watch_descriptor), watch_list);
if (NILP (tail))
return Qnil;
Lisp_Object watch = assq_no_quit (XCDR (watch_descriptor), XCDR (tail));
return ! NILP (watch) ? Qt : Qnil;
}