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:
- uri_prefix (gigl.common.Uri) 
- suffix (Optional[str]) 
 
- 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:
- uri (gigl.common.Uri) 
- pattern (Optional[str]) 
 
 
 - 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:
- dir_uri_src (gigl.common.Uri) 
- dir_uri_dst (gigl.common.Uri) 
 
 
 - load_file(file_uri_src, file_uri_dst, should_create_symlinks_if_possible=True)[source]#
- Parameters:
- file_uri_src (gigl.common.Uri) 
- file_uri_dst (gigl.common.Uri) 
- should_create_symlinks_if_possible (bool) 
 
- Return type:
- None 
 
 - load_files(source_to_dest_file_uri_map, should_create_symlinks_if_possible=True)[source]#
- Parameters:
- source_to_dest_file_uri_map (collections.abc.Mapping[gigl.common.Uri, gigl.common.Uri]) 
- should_create_symlinks_if_possible (bool) 
 
- Return type:
- None 
 
 - load_from_filelike(uri, filelike)[source]#
- Load a file from a file-like object into the specified URI. - Parameters:
- uri (Uri) – The URI to load the file into. 
- filelike (IO[AnyStr]) – A file-like object containing the data to be loaded. 
 
- 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 
 
 
