
(defun hpath:absolute-to (path &optional default-dirs) "\
Returns PATH as an absolute path relative to one directory from optional DEFAULT-DIRS or 'default-directory'.
Returns PATH unchanged when it is not a valid path or when DEFAULT-DIRS
is invalid.  DEFAULT-DIRS when non-nil may be a single directory or a list of
directories.  The first one in which PATH is found is used." (byte-code ";?ƒ
 ‚g 	?ƒ 
ÃB‰‚* 	;ƒ$ 	ÃB‰‚* 	<†* Ã?ƒ2 ‚g ÃÃ	…= ?…` ÇÈ	@!!Ç\"	A‰ˆÉ!†\\ Ã‰ˆ‚7 ˆ†f *‡" [path default-dirs default-directory nil t rtn dir expand-file-name file-name-as-directory file-exists-p] 7))

(defun hpath:at-p (&optional type non-exist) "\
Returns delimited path at point, if any.
Delimiters may be:  double quotes, open and close single quote, or
Texinfo file references.
If optional TYPE is the symbol 'file or 'directory, then only that path type is
accepted as a match.  Only locally reachable paths are checked for existence.
With optional NON-EXIST, nonexistent local paths are allowed.
Absolute pathnames must begin with a '/' or '~'.  Relative pathnames
must begin with a './' or '../' to be recognized." (byte-code "ÂÃÄÄ\"† ÃÅÆ\"† ÃÇÈ\"	#‡" [type non-exist hpath:is-p hargs:delimited "\"" "`" "'" "@file{" "}"] 7))

(defun hpath:ange-ftp-p nil "\
Returns an ange-ftp pathname that point is within or nil.
See the 'ange-ftp' Elisp package for pathname format details." (byte-code "ŠÀÁ!ˆÂÃ!… ÄÅÆ!ÇÆ!\")‡" [skip-chars-backward "^ 	
\"" looking-at "/[a-zA-Z][^@]*@[^: 	
\"]+:[^ 	
\"]*" buffer-substring match-beginning 0 match-end] 7))

(defun hpath:is-p (path &optional type non-exist) "\
Returns PATH if PATH is a Unix path, else nil.
If optional TYPE is the symbol 'file or 'directory, then only that path
type is accepted as a match.
The existence of the path is checked only for locally reachable paths.
With optional NON-EXIST, nonexistent local paths are allowed." (byte-code ";…x ÄÅ\"?…x ÆÇ\"?…x ÆÈ\"	ƒK 
É=ƒ3 ÄÊËÌO\"?…0 ‚H 
Í=ƒG ÄÊËÌO\"…D ‚H ‚w †R Î!…w 
É=ƒf Ï!?…c ‚w 
Í=ƒv Ï!…s ‚w )‡" [path remote-path type non-exist string= "" string-match "[ 	
\"`'{}()|\\]" "@.+:\\|.+:/" file "/" -1 nil directory file-exists-p file-directory-p] 11))

(defun hpath:relative-to (path &optional default-dir) "\
Returns PATH relative to optional DEFAULT-DIR or 'default-directory'.
Returns PATH unchanged when it is not a valid path." (byte-code ";… Ä!?ƒ ‚C ÅÆ	† 
!!Å!‰ˆ…C 	…C G	G^ÇÈO	\"ƒA ÉÊOP‚B )‡" [path default-dir default-directory end-dir file-exists-p expand-file-name file-name-as-directory string= 0 "./" nil] 9))

(defun hpath:validate (path) "\
Returns t if PATH is a valid, readable path, else signals error." (byte-code "Â!ƒ
 Á‚ ÃÄ\"‡" [path t file-readable-p error "(hpath:validate): \"%s\" is not readable."] 4))

(provide (quote hpath))
