Function: ede-convert-path
ede-convert-path is a byte-compiled function defined in files.el.gz.
Signature
(ede-convert-path ARG &rest ARGS)
Implementations
(ede-convert-path (THIS ede-target) PATH &optional PROJECT) in `ede/files.el'.
Convert path in a standard way for a given project. Default to making it project relative. Argument THIS is the project to convert PATH to. Optional PROJECT is the project that THIS belongs to. Associating a target to a project is expensive, so using this can speed things up.
(ede-convert-path (THIS ede-project) PATH) in `ede/files.el'.
Convert path in a standard way for a given project. Default to making it project relative. Argument THIS is the project to convert PATH to.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/ede/files.el.gz
;;; DIRECTORY CONVERSION STUFF
;;
(cl-defmethod ede-convert-path ((this ede-project) path)
"Convert path in a standard way for a given project.
Default to making it project relative.
Argument THIS is the project to convert PATH to."
(let ((pp (ede-project-root-directory this))
(fp (expand-file-name path)))
(if (string-match (regexp-quote pp) fp)
(substring fp (match-end 0))
(let ((pptf (file-truename pp))
(fptf (file-truename fp)))
(if (string-match (regexp-quote pptf) fptf)
(substring fptf (match-end 0))
(error "Cannot convert relativize path %s" fp))))))