On this page
genericpath.getatime
Prev: genericpath.exists | Up: genericpath | Next: genericpath.getctime
Rel: genericpath.commonprefix, genericpath.exists, genericpath.getctime, genericpath.getmtime
Ref: docs.python.org — genericpath.getatime
Tags: #public #python3 #stdlib #genericpath
Import
import genericpath
from genericpath import getatime
Signature & Overview
genericpath.getatime(filename)
Return the last access time of a file, reported by os.stat().
Usage
import os
assert os.path.getatime(".") > 0
Gotchas
- Prefer
os.path.getatime()/Path.stat().st_atime: Many modern filesystems mount withnoatime/relatime, so access times may not update on every read.
REPL Inspect
from genericpath import getatime
help(getatime)
Linked from
- tuts/python3/stdlib_module/genericpath
- tuts/python3/stdlib_module/genericpath/commonprefix
- tuts/python3/stdlib_module/genericpath/exists
- tuts/python3/stdlib_module/genericpath/getctime
- tuts/python3/stdlib_module/genericpath/getmtime
- tuts/python3/stdlib_module/genericpath/getsize
- tuts/python3/stdlib_module/genericpath/isdevdrive
- tuts/python3/stdlib_module/genericpath/isdir
- tuts/python3/stdlib_module/genericpath/isfile
- tuts/python3/stdlib_module/genericpath/isjunction
- tuts/python3/stdlib_module/genericpath/islink
- tuts/python3/stdlib_module/genericpath/lexists
- tuts/python3/stdlib_module/genericpath/samefile
- tuts/python3/stdlib_module/genericpath/sameopenfile
- tuts/python3/stdlib_module/genericpath/samestat
Related notes
- tuts/python3/stdlib_module/genericpath/commonprefix Linked here; links to this page; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/exists Linked here; links to this page; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/getctime Linked here; links to this page; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/getmtime Linked here; links to this page; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/genericpath/getsize links to this page; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/isdevdrive links to this page; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/isdir links to this page; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/isfile links to this page; shared tags: #genericpath, #stdlib
- tuts/python3/stdlib_module/genericpath/isjunction links to this page; shared tags: #genericpath, #stdlib