as.location function

Convert a path or URL to a location object.