Function: tar-goto-file

tar-goto-file is a byte-compiled function defined in tar-mode.el.gz.

Signature

(tar-goto-file FILE)

Documentation

Go to FILE in the current buffer.

FILE should be a relative file name. If FILE can't be found, return nil. Otherwise point is returned.

Source Code

;; Defined in /usr/src/emacs/lisp/tar-mode.el.gz
(defun tar-goto-file (file)
  "Go to FILE in the current buffer.
FILE should be a relative file name.  If FILE can't be found,
return nil.  Otherwise point is returned."
  (let ((start (point))
        found)
    (goto-char (point-min))
    (while (and (not found)
                (not (eobp)))
      (forward-line 1)
      (when-let ((descriptor (ignore-errors (tar-get-descriptor))))
        (when (equal (tar-header-name descriptor) file)
          (setq found t))))
    (if (not found)
        (progn
          (goto-char start)
          nil)
      (point))))