Function: projectile--directory-entry-set
projectile--directory-entry-set is a byte-compiled function defined in
projectile.el.
Signature
(projectile--directory-entry-set DIRECTORY)
Documentation
Return a hash set of the immediate entry names of DIRECTORY, or nil.
A single directory-files call replaces one file-exists-p per
candidate name - over TRAMP that turns N sequential remote round-trips
into one. Returns nil when DIRECTORY can't be listed (missing or
permission denied) or contains no entries.
Note: membership is by directory entry, not file-exists-p, so a broken
symlink named like a marker counts as present here (the old per-candidate
file-exists-p followed the link and returned nil). This is harmless in
practice - a project marker that is a dangling symlink is a pathological
setup.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--directory-entry-set (directory)
"Return a hash set of the immediate entry names of DIRECTORY, or nil.
A single `directory-files' call replaces one `file-exists-p' per
candidate name - over TRAMP that turns N sequential remote round-trips
into one. Returns nil when DIRECTORY can't be listed (missing or
permission denied) or contains no entries.
Note: membership is by directory entry, not `file-exists-p', so a broken
symlink named like a marker counts as present here (the old per-candidate
`file-exists-p' followed the link and returned nil). This is harmless in
practice - a project marker that is a dangling symlink is a pathological
setup."
(when-let* ((entries (ignore-errors
(directory-files
directory nil directory-files-no-dot-files-regexp t))))
(let ((set (make-hash-table :test 'equal :size (length entries))))
(dolist (entry entries) (puthash entry t set))
set)))