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={ "optionA": True, "optionB": 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
Release history Release notifications | RSS feed
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
File details
Details for the file treestamps-0.4.3.tar.gz
.
File metadata
- Download URL: treestamps-0.4.3.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1030-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df620f45b896d210f287e62b42a8b9c7af591fe79fc6b0cd3cf63964d2cc0db3 |
|
MD5 | 6f07eb95c4e6996475a3811a8d8d18d1 |
|
BLAKE2b-256 | b353150a0ceb06de5baf5865a217f84af89fd8b17d5039851df29b2c81d2e092 |
File details
Details for the file treestamps-0.4.3-py3-none-any.whl
.
File metadata
- Download URL: treestamps-0.4.3-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1030-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bd7a6d984ac60a3e8a5189e4294609a25f35d1843e63b0305b57d90ec3f901c |
|
MD5 | eaf814adb767f448d6dc4c416fd942d9 |
|
BLAKE2b-256 | 6d8766e40a5d341884020e13ee0e9c26317d6b956e3b4a82c7b7e1d2c3325206 |