given/when is a tiny bit prettier than huge if/elsif
use p6doc path-to-index

also .IO is never unopened, so .path is less assuming