Skip to content
Browse files

Added pathname-samep

  • Loading branch information...
1 parent 68a1eba commit dab04ac136f6da5e94cdca1ce14ed9613e2d9087 @gwkkwg committed
Showing with 10 additions and 0 deletions.
  1. +9 −0 dev/l0-files.lisp
  2. +1 −0 dev/package.lisp
9 dev/l0-files.lisp
@@ -73,6 +73,15 @@
:directory `(,@(pathname-directory pathname)
,(namestring (pathname-name+type pathname))))))
+(defun pathname-samep (p1 p2)
+ "Returns true if the logical translations of `p1` and `p2` have
+the same (`string=`) namestrings."
+ (and p1 p2
+ (typep p1 '(or string pathname))
+ (typep p2 '(or string pathname))
+ (string= (namestring (translate-logical-pathname p1))
+ (namestring (translate-logical-pathname p2)))))
(defgeneric make-stream-from-specifier (specifier direction &rest args)
(:documentation "Create and return a stream from specifier, direction and any other argsuments"))
1 dev/package.lisp
@@ -320,6 +320,7 @@
+ #:pathname-samep

0 comments on commit dab04ac

Please sign in to comment.
Something went wrong with that request. Please try again.