gigl.src.common.utils.file_loader#

Attributes#

Classes#

Module Contents#

class gigl.src.common.utils.file_loader.FileLoader(project=None)[source]#
Parameters:

project (Optional[str])

count_assets(uri_prefix, suffix=None)[source]#
Parameters:
Return type:

int

delete_files(uris)[source]#

Recursively delete files in the specified URIs.

Parameters:

uris (List[Uri]) – URIs to delete

Return type:

None

Returns

None

does_uri_exist(uri)[source]#

“” Check if a URI exists

Parameters:

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

Returns:

True if URI exists, False otherwise

Return type:

bool

list_children(uri, pattern=None)[source]#

List all children of the given URI. :param uri: The URI to list children of. :type uri: Uri :param pattern: Optional regex to match. If not provided then all children will be returned. :type pattern: Optional[str]

Returns:

A list of URIs for the children of the given URI.

Return type:

List[Uri]

Parameters:
load_directories(source_to_dest_directory_map)[source]#
Parameters:

source_to_dest_directory_map (Dict[gigl.common.Uri, gigl.common.Uri])

load_directory(dir_uri_src, dir_uri_dst)[source]#
Parameters:
load_file(file_uri_src, file_uri_dst, should_create_symlinks_if_possible=True)[source]#
Parameters:
Return type:

None

load_files(source_to_dest_file_uri_map, should_create_symlinks_if_possible=True)[source]#
Parameters:
Return type:

None

load_to_temp_file(file_uri_src, delete=False, should_create_symlinks_if_possible=True)[source]#
Parameters:
  • file_uri_src (gigl.common.Uri)

  • delete (bool)

  • should_create_symlinks_if_possible (bool)

Return type:

tempfile._TemporaryFileWrapper

gigl.src.common.utils.file_loader.logger[source]#