lance_io::object_store

Function ensure_table_uri

Source
pub fn ensure_table_uri(table_uri: impl AsRef<str>) -> Result<Url>
Expand description

Attempt to create a Url from given table location.

The location could be:

  • A valid URL, which will be parsed and returned
  • A path to a directory, which will be created and then converted to a URL.

If it is a local path, it will be created if it doesn’t exist.

Extra slashes will be removed from the end path as well.

Will return an error if the location is not valid. For example,