Function: f-read-text

f-read-text is a byte-compiled function defined in f.el.

Signature

(f-read-text PATH &optional CODING)

Documentation

Read text with PATH, using CODING.

CODING defaults to utf-8.

Return the decoded text as multibyte string.

Other relevant functions are documented in the f group.

Shortdoc

;; f
(f-read-text "path/to/file.txt" 'utf-8)
    -> [it depends]
  (f-read "path/to/file.txt" 'utf-8)
    -> [it depends]

Aliases

f-read

Source Code

;; Defined in ~/.emacs.d/elpa/f-20241003.1131/f.el
(defun f-read-text (path &optional coding)
  "Read text with PATH, using CODING.

CODING defaults to `utf-8'.

Return the decoded text as multibyte string."
  (decode-coding-string (f-read-bytes path) (or coding 'utf-8)))