Function: cvs-file-to-string
cvs-file-to-string is a byte-compiled function defined in
pcvs-util.el.gz.
Signature
(cvs-file-to-string FILE &optional ONELINE ARGS)
Documentation
Read the content of FILE and return it as a string.
If ONELINE is t, only the first line (no \n) will be returned. If ARGS is non-nil, the file will be executed with ARGS as its arguments. If ARGS is not a list, no argument will be passed.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/pcvs-util.el.gz
(defun cvs-file-to-string (file &optional oneline args)
"Read the content of FILE and return it as a string.
If ONELINE is t, only the first line (no \\n) will be returned.
If ARGS is non-nil, the file will be executed with ARGS as its
arguments. If ARGS is not a list, no argument will be passed."
(condition-case nil
(with-temp-buffer
(if args
(apply #'call-process
file nil t nil (when (listp args) args))
(insert-file-contents file))
(goto-char (point-min))
(buffer-substring (point)
(if oneline (line-end-position) (point-max))))
(file-error nil)))