ambrevar/file: Add path defmethod for strings and pathnames.

master
Pierre Neidhardt 2021-01-16 01:12:17 +01:00
parent e00dc4e1e9
commit 757be91df8
1 changed files with 6 additions and 0 deletions

View File

@ -45,6 +45,12 @@
(:export-accessor-names-p t)
(:export-class-name-p t))
(defmethod path ((s string))
s)
(defmethod path ((p pathname))
(namestring p))
(export-always 'extension)
(defmethod extension ((file file))
"Return the file extension.