Function: erc--download-directory

erc--download-directory is a byte-compiled function defined in eww.el.gz.

Signature

(erc--download-directory)

Documentation

Return the name of the download directory.

If ~/Downloads/ exists, that will be used, and if not, the DOWNLOAD XDG user directory will be returned. If that's undefined, ~/Downloads/ is returned anyway.

Source Code

;; Defined in /usr/src/emacs/lisp/net/eww.el.gz
(defun erc--download-directory ()
  "Return the name of the download directory.
If ~/Downloads/ exists, that will be used, and if not, the
DOWNLOAD XDG user directory will be returned.  If that's
undefined, ~/Downloads/ is returned anyway."
  (or (and (file-exists-p "~/Downloads/")
           "~/Downloads/")
      (when-let ((dir (xdg-user-dir "DOWNLOAD")))
        (file-name-as-directory dir))
      "~/Downloads/"))