From 9d4f5d39cd806452076d807aa508c83f0ac3cf91 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Mon, 18 Jan 2021 12:43:02 +0100 Subject: [PATCH] ambrevar/file: Add file=. --- .local/share/common-lisp/source/ambrevar/file.lisp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.local/share/common-lisp/source/ambrevar/file.lisp b/.local/share/common-lisp/source/ambrevar/file.lisp index c8c06c7d..25bfcae7 100644 --- a/.local/share/common-lisp/source/ambrevar/file.lisp +++ b/.local/share/common-lisp/source/ambrevar/file.lisp @@ -64,6 +64,13 @@ If none, return the empty string unlike `pathname-type'." (defmethod file? ((file file)) (eq (kind file) :regular-file)) +(defun file= (file1 file2) + "Return true if FILE1 and FILE2 point to the same file. +They might not be the same objects." + (and (file? file1) (file? file2) + (string= (path file1) + (path file2)))) + (defun separator (&optional char?) (if char? (uiop:directory-separator-for-host)