OmniUrl#

class omni.kit.converter.common.OmniUrl(url: str | Path, list_entry=None)#

Bases: object

Omniverse Url Helper Class

Methods

__init__(url[, list_entry])

Returns url as a OmniUrl()

get_local_file()

Returns: Path() object for local file

get_local_file_async()

Returns: Path() object for local file

sync_stat()

Returns the status of the url

url_with_name(name)

Return a new url with the url path final component changed.

url_with_path(path)

Return a new url with the path changed.

url_with_suffix(suffix)

Return a url with the file full suffix changed.

Attributes

exists

True if exists; else False

full_suffix

Return path suffix(s) if any.

name

The final path component, if any.

parent_url

OmniUrl object

path

Returns the path

scheme

stat

Status of the url

stem

The final path component, minus its suffix(s).

suffix

The final component's last suffix, if any.

writeable

Checks if the url path is writeable

__init__(url: str | Path, list_entry=None)#

Returns url as a OmniUrl()

get_local_file() Path#

Returns: Path() object for local file

async get_local_file_async() tuple[Result, Path]#

Returns: Path() object for local file

sync_stat()#

Returns the status of the url

url_with_name(
name: str,
) OmniUrl#

Return a new url with the url path final component changed.

url_with_path(
path: Path,
) OmniUrl#

Return a new url with the path changed.

url_with_suffix(
suffix: str,
) OmniUrl#

Return a url with the file full suffix changed. If the url path has no suffix, add given suffix. If the given suffix is an empty string, remove the suffix from the url path.

property exists#

True if exists; else False

Type:

Returns

property full_suffix: str#

Return path suffix(s) if any.

This includes the leading period. For example: ‘.skelanim.usd’

property name: str#

The final path component, if any.

property parent_url: OmniUrl#

OmniUrl object

Type:

Returns

property path#

Returns the path

property stat#

Status of the url

property stem: str#

The final path component, minus its suffix(s).

property suffix: str#

The final component’s last suffix, if any.

This includes the leading period. For example: ‘.txt’

property writeable#

Checks if the url path is writeable