v0.0.x: refactor dir reading