Skip to main content

crtime: get creation time of files for any platform and no external dependencies.

Project description

crtime

PyPI PyPI

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crtime-0.0.6.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crtime-0.0.6-py2.py3-none-any.whl (3.2 kB view details)

Uploaded Python 2Python 3

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

Hashes for crtime-0.0.6.tar.gz
Algorithm Hash digest
SHA256 f7a18fbf729bb6d2ded6ab5fc5888635ce75be99c70c9f6124aa2faa64f79efd
MD5 23ff0c301b056c12e797d78ab66c1f42
BLAKE2b-256 98a8f284eb7b30b88c5edfc01ee49dcd09764c08c5985503aab237615f119821

See more details on using hashes here.

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

Hashes for crtime-0.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f31f2c80a32c7f06061bc1d671028fffdcfa53240da62ff31ec0525f74d3e628
MD5 9992d43adf3d9823fbc94737bc9e15d3
BLAKE2b-256 dc67444b094505bc3333709fa43325123ba048e1c748a1dfcf9d20c7b777246a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page