FileSystemItem#

class omni.kit.widget.filebrowser.FileSystemItem(
path: str,
fields: FileBrowserItemFields,
is_folder: bool = False,
)#

Bases: FileBrowserItem

A Filebrowser item class for navigating a the local filesystem in a Filebrowser view. Sub-classed from FileBrowserItem.

Parameters:
  • path (str) – Path of the item.

  • fields (FileBrowserItemFields) – Fields of the item.

  • is_folder (bool) – Specify the item as a folder.

Methods

__init__(self)

keep_entry(entry)

Return True if we want to keep the given entry.

on_list_change_event(event, entry)

Handle ListEvent changes, should update this item's children list with the corresponding ListEntry.

populate_async(callback_async[, timeout])

Populate current item asynchronously if not already.

Attributes

readable

Return True if the item is readable.

writeable

Return True if the item is writable.

__init__(self: omni.ui._ui.AbstractItem) None#
static keep_entry(entry: DirEntry) bool#

Return True if we want to keep the given entry.

Parameters:

entry (os.DirEntry) – directory entry.

on_list_change_event(
event: ListEvent,
entry: ListEntry,
) bool#

Handle ListEvent changes, should update this item’s children list with the corresponding ListEntry.

Parameters:
  • event (omni.client.ListEvent) – One of of {UNKNOWN, CREATED, UPDATED, DELETED, METADATA, LOCKED, UNLOCKED}.

  • entry (omni.client.ListEntry) – Updated entry as defined by omni.client.

async populate_async(
callback_async: Callable,
timeout: float = 10.0,
) Any#

Populate current item asynchronously if not already. Overrides base method.

Parameters:
  • callback_async (Callable) – Function signature is void callback(result, children: [FileBrowserItem]), where result is an Exception type upon error.

  • timeout (float) – Time out duration on failed server connections. Default 10.0.

Returns:

Result of executing callback.

Return type:

Any

property readable: bool#

Return True if the item is readable.

property writeable: bool#

Return True if the item is writable.