Could you please add some documentation as well here? What's `dir`? How does it relate to `path` below?