Skip to content

Added get_times() to get timestamp information of files#2376

Open
AmeliaYeah wants to merge 1 commit into
spellshift:mainfrom
AmeliaYeah:main
Open

Added get_times() to get timestamp information of files#2376
AmeliaYeah wants to merge 1 commit into
spellshift:mainfrom
AmeliaYeah:main

Conversation

@AmeliaYeah

Copy link
Copy Markdown

What type of PR is this?

Feature
Eldritch-Function

What this PR does / why we need it:

While this does somewhat exist in the file.list API call (in regards to obtaining the stringified version of modified time), this is a bit of a hacky approach, and also doesn't work with directories. This API call is designed to be an easier way to obtain the time metadata of a file (aswell as beyond just the mtime).

My specific personal motivation was in regard to timestomping a file to it's metadata BEFORE writing to such file, but I'm sure there are multitudes of other use cases for this API call.

@AmeliaYeah AmeliaYeah changed the title get_times Added get_times() to get timestamp information of files Jun 28, 2026

@hulto hulto left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @AmeliaYeah and sorry for the delay.
We're all on a short break post CCDC so may be slow to respond.

This looks like a great feature!
Instead of adding a new function though would moving this capability to the existing file list function make sense for your use case?
I like the idea of update file list to work on dirs, and also switching to epoch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants