ambrevar/file: Add match-date< and match-date> helpers.
parent
8d0ecf6a76
commit
42335e2759
|
@ -133,3 +133,13 @@ Without PREDICATES, list all files."
|
||||||
Without PREDICATES, list all files."
|
Without PREDICATES, list all files."
|
||||||
(let ((*finder-include-directories* nil))
|
(let ((*finder-include-directories* nil))
|
||||||
(apply #'walk root predicates)))
|
(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)))
|
||||||
|
|
Loading…
Reference in New Issue