ambrevar/file: Add match-date< and match-date> helpers.

master
Pierre Neidhardt 2021-01-15 13:38:36 +01:00
parent 8d0ecf6a76
commit 42335e2759
1 changed files with 10 additions and 0 deletions

View File

@ -133,3 +133,13 @@ Without PREDICATES, list all files."
Without PREDICATES, list all files."
(let ((*finder-include-directories* nil))
(apply #'walk root predicates)))
(defun match-date< (timestamp)
"Return a file predicate that matches on modification time #'< than timestamp."
(lambda (file)
(local-time:timestamp< (modification-date file) timestamp)))
(defun match-date> (timestamp)
"Return a file predicate that matches on modification time #'> than timestamp."
(lambda (file)
(local-time:timestamp> (modification-date file) timestamp)))