Background:
Currently, listall.py only stores file/directory paths plus a minimal date-based sort for files. We can't easily sort subdirectories by date or output file size, permissions, etc. It was suggested to add richer data support, akin to a ls -lR or a CSV/JSON with all relevant metadata.
Proposal:
- During the
collect_files() phase, gather os.stat(...) for each directory and file, storing:
- Modified time (
mtime)
- Size
- Possibly creation time (
ctime) or permissions
- Permissions
- etc
- Store them in a data structure like:
{
"/abs/path/to/dir": {
"mtime": ...,
"files": [
{ "path": file_path, "mtime": ..., "size": ..., ... },
...
]
},
...
}
Background:
Currently,
listall.pyonly stores file/directory paths plus a minimal date-based sort for files. We can't easily sort subdirectories by date or output file size, permissions, etc. It was suggested to add richer data support, akin to als -lRor a CSV/JSON with all relevant metadata.Proposal:
collect_files()phase, gatheros.stat(...)for each directory and file, storing:mtime)ctime) or permissions{ "/abs/path/to/dir": { "mtime": ..., "files": [ { "path": file_path, "mtime": ..., "size": ..., ... }, ... ] }, ... }