Function: hpath:posix-to-mswindows
hpath:posix-to-mswindows is an autoloaded, interactive and
byte-compiled function defined in hpath.el.
Signature
(hpath:posix-to-mswindows PATH)
Documentation
Convert a Posix-style PATH to an MSWindows path or return the path unchanged.
If path begins with an optional mount prefix, hpath:mswindows-mount-prefix, followed by an MSWindows drive letter, remove the mount prefix.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hpath.el
;;;###autoload
(defun hpath:posix-to-mswindows (path)
"Convert a Posix-style PATH to an MSWindows path or return the path unchanged.
If path begins with an optional mount prefix,
`hpath:mswindows-mount-prefix', followed by an MSWindows drive
letter, remove the mount prefix."
(interactive "sPOSIX path to convert to MSWindows: ")
(when (stringp path)
(when (string-match hpath:mswindows-drive-regexp path)
(let* ((drive-prefix (downcase (match-string 2 path)))
(absolute-p (= (aref path (1- (match-end 0))) ?/))
(rest-of-path (substring path (match-end 0))))
;; Convert formerly Posix-style Windows disk drive paths to MSWindows-style.
(setq path (concat drive-prefix ":"
(if (or (not absolute-p)
(string-match "\\`[~/]" rest-of-path))
""
"/")
rest-of-path))))
(hpath:posix-to-mswindows-separators path)))