BalancedDiscStorageZ class¶
-
class
BalancedDiscStorage.balanced_disc_storage_z.
BalancedDiscStorageZ
(path)¶ Bases:
BalancedDiscStorage.balanced_disc_storage.BalancedDiscStorage
This class is the same as
BalancedDiscStorage
, but it also allows adding the.zip
files, which are unpacked to proper path in storage.-
max_zipfiles
= None¶ How many files may be in .zip
-
add_archive_as_dir
(zip_file_obj)¶ Add archive to the storage and unpack it.
Parameters: zip_file_obj (file) – Opened file-like object.
Returns: Path where the zip_file_obj was unpacked wrapped in
PathAndHash
structure.Return type: obj
Raises: ValueError
– If there is too many files in .zip archive. See_max_zipfiles
for details.AssertionError
– If the zip_file_obj is not file-like object.
-