Function: f-access-time

f-access-time is a byte-compiled function defined in f.el.

Signature

(f-access-time PATH &optional TIMESTAMP-P)

Documentation

Return the last access time of PATH.

The access time (atime) of PATH is 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-access-time "path/to/file.txt")
    => (25517 48756 26337 111000)
  (f-access-time "path/to/dir")
    => (25517 57887 344657 210000)
  (f-access-time "path/to/file.txt" t)
    => (1672330868026337111 . 1000000000)
  (f-access-time "path/to/dir" t)
    => (1672339999344657210 . 1000000000)
  (f-access-time "path/to/file.txt" 'seconds)
    => 1672330868
  (f-access-time "path/to/dir" 'seconds)
    => 1672339999

Source Code

;; Defined in ~/.emacs.d/elpa/f-20241003.1131/f.el
(defun f-access-time (path &optional timestamp-p)
  "Return the last access time of PATH.
The access time (atime) of PATH is 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-access-time)
                   #'file-attribute-access-time
                 (lambda (f) (nth 4 f)))))