Function: f-size

f-size is a byte-compiled function defined in f.el.

Signature

(f-size PATH)

Documentation

Return size of PATH.

If PATH is a file, return size of that file. If PATH is directory, return sum of all files in PATH.

Source Code

;; Defined in ~/.emacs.d/elpa/f-20241003.1131/f.el
;;;; Stats

(defun f-size (path)
  "Return size of PATH.

If PATH is a file, return size of that file.  If PATH is
directory, return sum of all files in PATH."
  (if (f-directory-p path)
      (-sum (-map 'f-size (f-files path nil t)))
    (nth 7 (file-attributes path))))