Function: projectile-dir-files-alien
projectile-dir-files-alien is a byte-compiled function defined in
projectile.el.
Signature
(projectile-dir-files-alien DIRECTORY &optional VCS SUBDIRS)
Documentation
Get the files for DIRECTORY using external tools.
VCS, when supplied, must be the project's VCS as returned by
projectile-project-vcs. It is computed from DIRECTORY when
omitted; callers that already resolved the VCS can pass it in to
avoid the redundant work.
SUBDIRS, when non-nil, is a list of subdirectory paths (relative
to DIRECTORY) restricting the listing. The external command
receives them as positional arguments and submodule files are
filtered to those falling under one of the subdirectories. This
is how dirconfig + keep entries are honoured by hybrid indexing
without shelling out per kept directory.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-dir-files-alien (directory &optional vcs subdirs)
"Get the files for DIRECTORY using external tools.
VCS, when supplied, must be the project's VCS as returned by
`projectile-project-vcs'. It is computed from DIRECTORY when
omitted; callers that already resolved the VCS can pass it in to
avoid the redundant work.
SUBDIRS, when non-nil, is a list of subdirectory paths (relative
to DIRECTORY) restricting the listing. The external command
receives them as positional arguments and submodule files are
filtered to those falling under one of the subdirectories. This
is how dirconfig `+' keep entries are honoured by hybrid indexing
without shelling out per kept directory."
(let ((vcs (or vcs (projectile-project-vcs directory))))
(cond
((eq vcs 'git)
(let* ((fd (and projectile-git-use-fd
(projectile-fd-executable-for directory)))
(files (nconc (projectile-files-via-ext-command
directory (projectile--alien-ext-command vcs directory)
subdirs)
;; Submodules are listed by their own `git ls-files'
;; runs, which never saw our exclusions, so those
;; files have to be filtered here.
(projectile--maybe-remove-ignored
directory
(projectile--restricted-sub-projects-files directory vcs subdirs))))
;; When using git ls-files (not fd), deleted but unstaged
;; files are still reported. Remove them. Note that the
;; fd-availability check is per-DIRECTORY: a project may be
;; on a remote host where fd isn't installed even though it
;; is locally.
(deleted (unless fd
(projectile-git-deleted-files directory))))
(if deleted
(let ((deleted-set (make-hash-table :test 'equal :size (length deleted))))
(dolist (f deleted) (puthash f t deleted-set))
(seq-remove (lambda (f) (gethash f deleted-set)) files))
files)))
(t (projectile-files-via-ext-command
directory (projectile--alien-ext-command vcs directory) subdirs)))))