Function: filesets-filter-dir-names

filesets-filter-dir-names is a byte-compiled function defined in filesets.el.gz.

Signature

(filesets-filter-dir-names LST &optional NEGATIVE)

Documentation

Remove non-directory names from a list of strings.

If NEGATIVE is non-nil, remove all directory names.

Source Code

;; Defined in /usr/src/emacs/lisp/filesets.el.gz
(defun filesets-filter-dir-names (lst &optional negative)
  "Remove non-directory names from a list of strings.
If NEGATIVE is non-nil, remove all directory names."
  (seq-filter (lambda (x)
                (and (not (string-match-p "^\\.+/$" x))
                     (if negative
                         (not (string-match-p "[:/\\]$" x))
                       (string-match-p "[:/\\]$" x))))
              lst))