Function: ghostel--read-module-sidecar-version

ghostel--read-module-sidecar-version is a natively compiled function defined in ghostel-module-install.el.

Signature

(ghostel--read-module-sidecar-version DIR)

Documentation

Return the version string recorded in DIR's sidecar, or nil.

A missing or empty file returns nil; the result is otherwise trimmed.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-module-install.el
(defun ghostel--read-module-sidecar-version (dir)
  "Return the version string recorded in DIR's sidecar, or nil.
A missing or empty file returns nil; the result is otherwise trimmed."
  (let ((path (ghostel--module-sidecar-path dir)))
    (when (file-readable-p path)
      (let ((s (with-temp-buffer
                 (insert-file-contents path)
                 (string-trim (buffer-string)))))
        (and (not (string-empty-p s)) s)))))