ambrevar/file: Add file=.

master
Pierre Neidhardt 2021-01-18 12:43:02 +01:00
parent 2effcf80a3
commit 9d4f5d39cd
1 changed files with 7 additions and 0 deletions

View File

@ -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)