Function: f-modification-time
f-modification-time is a byte-compiled function defined in f.el.
Signature
(f-modification-time PATH &optional TIMESTAMP-P)
Documentation
Return the last modification time of PATH.
The modification time (mtime) of PATH in the same format as
current-time. For details on TIMESTAMP-P and the format of the
returned value, see f--get-time.
Other relevant functions are documented in the f group.
Shortdoc
;; f
(f-modification-time "path/to/file.txt")
=> (25517 48756 26337 111000)
(f-modification-time "path/to/dir")
=> (25517 57887 344657 210000)
(f-modification-time "path/to/file.txt" t)
=> (1672330868026337111 . 1000000000)
(f-modification-time "path/to/dir" t)
=> (1672339999344657210 . 1000000000)
(f-modification-time "path/to/file.txt" 'seconds)
=> 1672330868
(f-modification-time "path/to/dir" 'seconds)
=> 1672339999
Source Code
;; Defined in ~/.emacs.d/elpa/f-20241003.1131/f.el
(defun f-modification-time (path &optional timestamp-p)
"Return the last modification time of PATH.
The modification time (mtime) of PATH in the same format as
`current-time'. For details on TIMESTAMP-P and the format of the
returned value, see `f--get-time'."
(f--get-time path
timestamp-p
(if (fboundp 'file-attribute-modification-time)
#'file-attribute-modification-time
(lambda (f) (nth 5 f)))))