Skip to main content

Module cachefile

Module cachefile 

Source
Expand description

Small files in the config folder that several commands may write at once.

Functions§

rewrite
Replaces dir/name with change of its text (empty when there is no file yet). Writers take turns on name.lock, a file that is never replaced, so no write is lost. Readers don’t lock: the rename swaps in the whole file at once.