API for Recently Used Items (#8792)

* feat: add file creation time to model file metadata and user file info

* fix linting
This commit is contained in:
Johnpaul Chiwetelu
2025-08-02 03:02:06 +01:00
committed by GitHub
parent bff60b5cfc
commit 3dfefc88d0
2 changed files with 19 additions and 6 deletions

View File

@@ -20,13 +20,15 @@ class FileInfo(TypedDict):
path: str
size: int
modified: int
created: int
def get_file_info(path: str, relative_to: str) -> FileInfo:
return {
"path": os.path.relpath(path, relative_to).replace(os.sep, '/'),
"size": os.path.getsize(path),
"modified": os.path.getmtime(path)
"modified": os.path.getmtime(path),
"created": os.path.getctime(path)
}