Nodes/comfy-ovum/os.path.getatime
ComfyUI Node

os.path.getatime

When was this file last touched? getatime as a node

By sfinktah·Created about a year ago·Updated 10 months ago· 7
os.path.getatime
  • path_in
  • atime
path

Ovum Os Path GetAtime wraps os.path.getatime: given a path, it returns the last-access time as a floating-point number of seconds since the Unix epoch (January 1, 1970). It's one of a trio of timestamp nodes the pack ships alongside getmtime (last modified) and getctime (creation/metadata change) - and of the three, atime is the one you'll actually reach for least, for reasons I'll get to.

So when would you use it? Mostly in "newest/oldest file" logic. If you're scanning an output folder to pick which recent render to keep or delete, comparing access times is one way to rank files by how recently they were touched. The output is a plain FLOAT, so it drops straight into comparison nodes or math (subtract two atimes to get an age in seconds).

How it works

Direct os.path.getatime() delegation via the family's shared base - a path widget plus an optional path_in jack (PATHLIKE,STRING) that wins when connected. This one's a real filesystem call, so the path must exist; unlike the string-manipulation siblings in this pack, it will error if the file isn't there. The returned value is the epoch-seconds float, as-is.

The inputs and outputs that matter

  • path (required, STRING) - the path to query.
  • path_in (optional, PATHLIKE,STRING) - wired alternative to the widget.
  • atime (output, FLOAT) - last-access time as Unix epoch seconds.

There's no forward_slashes toggle on this node - the output is a number, not a path.

Installing it

In comfy-ovum (sfinktah). ComfyUI Manager: search "comfy-ovum", install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum

Restart after. No models to download; the pack's dependencies are light and Manager installs them.

Common issues

The honest caveat: on modern systems, atime is a weak signal. Linux defaults to relatime, which only updates access time under certain conditions, and plenty of workflows read files constantly - so "last accessed" often means "last time anything read this," which may not be what you want for ordering renders. For "when did this output get created," prefer getctime on Windows (true creation time) or getmtime for the last write. Also remember the epoch-seconds format: a raw 1750000000.0 isn't human-friendly, so feed it through a date-formatting node if you want to display it.

Categoryovum/path/os.path

Inputs (2)

NameTypeDefaultDescription
pathSTRING
path_inoptPATHLIKE,STRING

Outputs (1)

NameTypeDescription
atimeFLOAT