Extend a relative pathname to an absolute pathname
General Form: (extend-pathname dir filename state)
where
The following examples flesh out the behavior of
Examples (comments added) ACL2 !>(extend-pathname "~/temp" "foo.lisp" state) ; where the user is "bubba" here and in the remaining examples "/home/bubba/temp/foo.lisp" ACL2 !>(extend-pathname "~/temp/" "foo.lisp" state) ; the final / is optional for the directory name "/home/bubba/temp/foo.lisp" ACL2 !>(extend-pathname "~/temp/" "no-such-file" state) ; name of non-existent file is still extended "/home/bubba/temp/no-such-file" ACL2 !>(extend-pathname "." "no-such-file" state) ; assumes that the current working directory is "/home/joe" "/home/joe/no-such-file" ACL2 !>(extend-pathname (cbd) "no-such-file" state) ; assumes that the connected book directory (see :DOC cbd) is "/data/santa" "/data/santa/no-such-file" ACL2 !>(extend-pathname :system "no-such-file" state) ; assumes that system books directory is "/data/acl2/books" "/data/acl2/books/no-such-file" ACL2 !>(extend-pathname "/data/acl2" "~/temp/foo.lisp" state) ; directory is ignored when filename is already absolute "/home/bubba/temp/foo.lisp" ACL2 !>(extend-pathname :system "~/temp/foo.lisp" state) ; directory is ignored when filename is already absolute "/home/bubba/temp/foo.lisp"
Note that when the indicated file exists,