nvflare.fuel.hci.zip_utils module¶
- convert_legacy_zip(zip_data: bytes) bytes [source]¶
Convert a legacy app in zip into job layout in memory.
- Parameters
zip_data – The input zip data
- Returns
The converted zip data
- get_all_file_paths(directory)[source]¶
Gets all file paths in the directory.
- Parameters
directory – directory to get all paths for
- Returns
A list of paths of all the files in the provided directory
- normpath_for_zip(path)[source]¶
Normalizes the path for zip file.
- Parameters
path (str) – the path to be normalized
- split_path(path: str) -> (<class 'str'>, <class 'str'>)[source]¶
Splits a path into a pair of head and tail.
It removes trailing os.path.sep and call os.path.split
- Parameters
path – Path to split
- Returns
A tuple of (head, tail)