Skip to main content

Create timestamp records for recursive operations on directory trees.

Project description

Treestamps

A library to set and retrieve timestamps to speed up operations run recursively on directory trees.

Documentation is pretty poor. Read the code for now.

Usage

Used in picopt and nudebomb. You can see how it's used in those projects.

    from treestamps import Copsestamps, CopsestampsConfig

    config = GrovestampsConfig(
        "MyProgramName",
        paths=["/foo", "/bar"],
        program_config={ "option_a": True, "option_b": False}
    )
    cs = Grovestamps(config)

    timestamp = cs["/foo"].get()
    cs["/foo"].set()

    cs["/foo"].dump()

    cs.dump()

Breaking Changes from 0.3.x

Renamed

Treestamps.dirpath() -> Treestamps.get_dir() Treestamps.dir -> Treestamps.root_dir

Made Private

Treestamps.prune_dict() -> Treestamps._prune_dict() Treestamps.consume_all_child_timestamps() -> Treestamps._consume_all_child_timestamps()

Added

Treestamps.add_consumed_path(), for legacy treestamps importers to remove old files. Copsestamps() is the ubquitous dir of rootpaths to Treestamps.

Changed

Grovestamps() and Treestamps() both require a GrovestampsConfig or TreestampsConfig respectively as their sole param.

Treestamps now record the ignored and symlinks config options in the file and if they change the file is not loaded. This is optional with the check_config configuration option.

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

treestamps-1.0.0.tar.gz (22.1 kB view hashes)

Uploaded Source

Built Distribution

treestamps-1.0.0-py3-none-any.whl (22.9 kB view hashes)

Uploaded Python 3

Supported by

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