chore(pkg/filepath): make ParseFilepath generic