gigl.src.common.utils.FileLoader#

class gigl.src.common.utils.file_loader.FileLoader(project: str | None = None)#

Bases: object

Methods

__init__

count_assets

delete_files

Recursively delete files in the specified URIs.

does_uri_exist

""

list_children

List all children of the given URI. Args: uri (Uri): The URI to list children of. pattern (Optional[str]): Optional regex to match. If not provided then all children will be returned. Returns: List[Uri]: A list of URIs for the children of the given URI.

load_directories

load_directory

load_file

load_files

load_to_temp_file

__init__(project: str | None = None)#
__weakref__#

list of weak references to the object (if defined)

delete_files(uris: List[Uri]) None#

Recursively delete files in the specified URIs.

Args:

uris (List[Uri]): URIs to delete

Returns

None

does_uri_exist(uri: str | Uri) bool#

“” Check if a URI exists

Args:

uri (Union[str, Uri]): uri to check

Returns:

bool: True if URI exists, False otherwise

list_children(uri: Uri, pattern: str | None = None) Sequence[Uri]#

List all children of the given URI. Args:

uri (Uri): The URI to list children of. pattern (Optional[str]): Optional regex to match. If not provided then all children will be returned.

Returns:

List[Uri]: A list of URIs for the children of the given URI.