Function: f--write-bytes

f--write-bytes is a byte-compiled function defined in f.el.

Signature

(f--write-bytes DATA FILENAME APPEND)

Documentation

Write binary DATA to FILENAME.

If APPEND is non-nil, append the DATA to the existing contents.

Source Code

;; Defined in ~/.emacs.d/elpa/f-20241003.1131/f.el
(defun f--write-bytes (data filename append)
  "Write binary DATA to FILENAME.
If APPEND is non-nil, append the DATA to the existing contents."
  (f--destructive filename
    (unless (f-unibyte-string-p data)
      (signal 'wrong-type-argument (list 'f-unibyte-string-p data)))
    (let ((coding-system-for-write 'binary)
          (write-region-annotate-functions nil)
          (write-region-post-annotation-function nil))
      (write-region data nil filename append :silent)
      nil)))