Function: eshell-pred-file-links

eshell-pred-file-links is a byte-compiled function defined in em-pred.el.gz.

Signature

(eshell-pred-file-links)

Documentation

Return a predicate to test whether a file has a given number of links.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/em-pred.el.gz
(defun eshell-pred-file-links ()
  "Return a predicate to test whether a file has a given number of links."
  (let ((qual (eshell-get-comparison-modifier-argument))
        (amount (or (eshell-get-numeric-modifier-argument)
                    (error "Invalid file link count modifier `l'"))))
    (lambda (file)
      (when-let* ((attrs (eshell-file-attributes file)))
	  (funcall qual (file-attribute-link-number attrs) amount)))))