Generate method that returns a path