Function: projectile--watch-directories
projectile--watch-directories is a byte-compiled function defined in
projectile.el.
Signature
(projectile--watch-directories PROJECT FILES)
Documentation
Return the directories of PROJECT to watch, derived from cached FILES.
The result contains the project root and the directory chain of every cached file, as absolute names with trailing slashes. Directories with no cached files below them (e.g. empty directories) are not included, so files that later appear in them go unnoticed until the next full re-index.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--watch-directories (project files)
"Return the directories of PROJECT to watch, derived from cached FILES.
The result contains the project root and the directory chain of every
cached file, as absolute names with trailing slashes. Directories with
no cached files below them (e.g. empty directories) are not included,
so files that later appear in them go unnoticed until the next full
re-index."
(let ((dirs (make-hash-table :test 'equal)))
(puthash (file-name-as-directory (expand-file-name project)) t dirs)
(dolist (file files)
(dolist (dir (projectile--directory-ancestors file))
(puthash (expand-file-name dir project) t dirs)))
(hash-table-keys dirs)))