diff --git a/.local/share/common-lisp/source/ambrevar/file.lisp b/.local/share/common-lisp/source/ambrevar/file.lisp index f326a842..0844a2a8 100644 --- a/.local/share/common-lisp/source/ambrevar/file.lisp +++ b/.local/share/common-lisp/source/ambrevar/file.lisp @@ -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)))