NeuroMorphoCacheLayout#
- class braincell.io.NeuroMorphoCacheLayout(root)[source]#
Pure path builder for the on-disk NeuroMorpho.Org cache layout.
Performs no I/O. Answers “where would file X for neuron N live if it existed”. Used by
NeuroMorphoCacheand testable in isolation.- Parameters:
root (
Path) – Cache root directory. Need not exist; the layout is purely symbolic.
Examples
>>> layout = NeuroMorphoCacheLayout(Path("/tmp/nm")) >>> layout.neuron_dir(10047) PosixPath('/tmp/nm/10047') >>> layout.metadata_path(10047) PosixPath('/tmp/nm/10047/metadata.json')