Function: org-publish-attachment
org-publish-attachment is a byte-compiled function defined in
ox-publish.el.gz.
Signature
(org-publish-attachment PLIST FILENAME PUB-DIR)
Documentation
Publish a file with no transformation of any kind.
FILENAME is the filename of the Org file to be published. PLIST is the property list for the given project. PUB-DIR is the publishing directory.
Return output file name.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-publish.el.gz
(defun org-publish-attachment (_plist filename pub-dir)
"Publish a file with no transformation of any kind.
FILENAME is the filename of the Org file to be published. PLIST
is the property list for the given project. PUB-DIR is the
publishing directory.
Return output file name."
(unless (file-directory-p pub-dir)
(make-directory pub-dir t))
(let ((output (expand-file-name (file-name-nondirectory filename) pub-dir)))
(unless (file-equal-p (expand-file-name (file-name-directory filename))
(file-name-as-directory (expand-file-name pub-dir)))
(copy-file filename output t))
;; Return file name.
output))