Function: denote-sort-modified-time-greaterp

denote-sort-modified-time-greaterp is a byte-compiled function defined in denote.el.

Signature

(denote-sort-modified-time-greaterp FILE1 FILE2)

Documentation

Return non-nil if FILE1 modified time is greater than that of FILE2.

Source Code

;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defun denote-sort-modified-time-greaterp (file1 file2)
  "Return non-nil if FILE1 modified time is greater than that of FILE2."
  (let* ((attributes1 (file-attributes file1))
         (mod-time1-raw (file-attribute-modification-time attributes1))
         (mod-time1-seconds (time-to-seconds mod-time1-raw))
         (attributes2 (file-attributes file2))
         (mod-time2-raw (file-attribute-modification-time attributes2))
         (mod-time2-seconds (time-to-seconds mod-time2-raw)))
    ;; NOTE 2025-06-23: We normally sort using a "less" approach, but
    ;; here we want to capture the semantics of "last modified"
    ;; without relying on a reverse sort.
    (> mod-time1-seconds mod-time2-seconds)))