crtime: get creation time of files for any platform and no external dependencies.
Project description
crtime
Get creation time of files for any platform and no external dependencies.
Caveat
Linux requires sudo! There is no way to avoid this, as creation time is not exposed by the kernel.
It uses debugfs to mount the filesystem, as the information is actually contained on most linux platforms.
Speed: because it does one query for a whole directory, it is roughly 1000x faster than any other method (such as the xstat utility that can be found online).
Installation
pip install crtime
Usage
In a shell:
crtime .
# 1552938709\tfile_a.py
In Python
from crtime import get_crtimes_in_dir
for fname, date in get_crtimes_in_dir(".", raise_on_error=True, as_epoch=False):
print(fname, date)
# file_a.py Mon Mar 18 20:51:18 CET 2019
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crtime-0.0.6.tar.gz.
File metadata
- Download URL: crtime-0.0.6.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0a0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7a18fbf729bb6d2ded6ab5fc5888635ce75be99c70c9f6124aa2faa64f79efd
|
|
| MD5 |
23ff0c301b056c12e797d78ab66c1f42
|
|
| BLAKE2b-256 |
98a8f284eb7b30b88c5edfc01ee49dcd09764c08c5985503aab237615f119821
|
File details
Details for the file crtime-0.0.6-py2.py3-none-any.whl.
File metadata
- Download URL: crtime-0.0.6-py2.py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0a0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f31f2c80a32c7f06061bc1d671028fffdcfa53240da62ff31ec0525f74d3e628
|
|
| MD5 |
9992d43adf3d9823fbc94737bc9e15d3
|
|
| BLAKE2b-256 |
dc67444b094505bc3333709fa43325123ba048e1c748a1dfcf9d20c7b777246a
|