Function: file-notify--add-watch-kqueue

file-notify--add-watch-kqueue is a byte-compiled function defined in filenotify.el.gz.

Signature

(file-notify--add-watch-kqueue FILE DIR FLAGS)

Documentation

Add a watch for FILE in DIR with FLAGS, using kqueue.

Source Code

;; Defined in /usr/src/emacs/lisp/filenotify.el.gz
(defun file-notify--add-watch-kqueue (file _dir flags)
  "Add a watch for FILE in DIR with FLAGS, using kqueue."
  ;; kqueue does not report changes to file contents when watching
  ;; directories, so we watch each file directly.
  (kqueue-add-watch file
                    (append
                     (and (memq 'change flags)
                          '(create delete write extend rename))
                     (and (memq 'attribute-change flags)
                          '(attrib)))
                    #'file-notify--callback-kqueue))