diff --git a/docs/source/api_doc/archive/index.rst b/docs/source/api_doc/archive/index.rst index e0e5503ddf7..26328e82349 100644 --- a/docs/source/api_doc/archive/index.rst +++ b/docs/source/api_doc/archive/index.rst @@ -27,6 +27,21 @@ archive_unpack +archive_writer +---------------------------------------- + +.. autofunction:: archive_writer + + + +ArchiveWriter +---------------------------------------- + +.. autoclass:: ArchiveWriter + :members: __init__, open, add, close, __enter__, __exit__ + + + get_archive_type ---------------------------------------- diff --git a/docs/source/api_doc/archive/supported_types.demo.py b/docs/source/api_doc/archive/supported_types.demo.py index ff48ec47602..1df6c472eed 100644 --- a/docs/source/api_doc/archive/supported_types.demo.py +++ b/docs/source/api_doc/archive/supported_types.demo.py @@ -5,7 +5,7 @@ if __name__ == '__main__': columns = ['Format', 'Extension Name'] rows = [] - for key, (exts, _, _) in sorted(_KNOWN_ARCHIVE_TYPES.items()): + for key, (exts, _, _, _) in sorted(_KNOWN_ARCHIVE_TYPES.items()): rows.append((key, ', '.join(f'``{v}``' for v in exts))) df = pd.DataFrame(columns=columns, data=rows) diff --git a/hfutils/archive/__init__.py b/hfutils/archive/__init__.py index 92207966dc4..e9e2e786f71 100644 --- a/hfutils/archive/__init__.py +++ b/hfutils/archive/__init__.py @@ -17,8 +17,9 @@ .. warning:: The creation of archive files in the RAR format is not supported, as we utilize the `rarfile `_ library, which does not offer functionality for creating RAR files. """ -from .base import register_archive_type, archive_pack, archive_unpack, get_archive_type, get_archive_extname -from .rar import _rar_pack, _rar_unpack -from .sevenz import _7z_pack, _7z_unpack -from .tar import _tarfile_pack, _tarfile_unpack -from .zip import _zip_pack, _zip_unpack +from .base import register_archive_type, archive_pack, archive_unpack, get_archive_type, get_archive_extname, \ + archive_writer, ArchiveWriter +from .rar import _rar_pack, _rar_unpack, RARWriter +from .sevenz import _7z_pack, _7z_unpack, SevenZWriter +from .tar import _tarfile_pack, _tarfile_unpack, TarWriter +from .zip import _zip_pack, _zip_unpack, ZipWriter diff --git a/hfutils/archive/base.py b/hfutils/archive/base.py index 20d173a9d5e..4d3d2b667cf 100644 --- a/hfutils/archive/base.py +++ b/hfutils/archive/base.py @@ -14,10 +14,101 @@ import warnings from typing import List, Dict, Tuple, Callable, Optional -_KNOWN_ARCHIVE_TYPES: Dict[str, Tuple[List[str], Callable, Callable]] = {} +class ArchiveWriter: + """ + A base class for creating archive writers. + + This class provides a context manager interface for handling archive files, + allowing files to be added to the archive and ensuring proper resource management. + + :param archive_file: The path to the archive file to be created or modified. + :type archive_file: str + """ + + def __init__(self, archive_file: str): + self.archive_file = archive_file + self._handler = None + + def _create_handler(self): + """ + Create the handler for the archive writer. + + This method should be overridden by subclasses to provide specific + handler creation logic for different archive types. + + :raises NotImplementedError: If not overridden in a subclass. + """ + raise NotImplementedError # pragma: no cover + + def _add_file(self, filename: str, arcname: str): + """ + Add a file to the archive. + + This method should be overridden by subclasses to define how files + are added to the archive for different formats. + + :param filename: The path to the file to add to the archive. + :type filename: str + :param arcname: The archive name for the file. + :type arcname: str + :raises NotImplementedError: If not overridden in a subclass. + """ + raise NotImplementedError # pragma: no cover + + def open(self): + """ + Open the archive for writing. + + Initializes the handler if it has not been created yet. + """ + if self._handler is None: + self._handler = self._create_handler() + + def add(self, filename: str, arcname: str): + """ + Add a file to the archive. + + :param filename: The path to the file to add. + :type filename: str + :param arcname: The name to use for the file within the archive. + :type arcname: str + """ + return self._add_file(filename, arcname) + + def close(self): + """ + Close the archive. + + Ensures that all resources are properly released. + """ + if self._handler is not None: + self._handler.close() + self._handler = None + + def __enter__(self): + """ + Enter the runtime context related to this object. + + Opens the archive for writing. + """ + self.open() + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + """ + Exit the runtime context related to this object. -def register_archive_type(name: str, exts: List[str], fn_pack: Callable, fn_unpack: Callable): + Closes the archive, ensuring that resources are released. + """ + self.close() + + +_FN_WRITER = Callable[[str], ArchiveWriter] +_KNOWN_ARCHIVE_TYPES: Dict[str, Tuple[List[str], Callable, Callable, _FN_WRITER]] = {} + + +def register_archive_type(name: str, exts: List[str], fn_pack: Callable, fn_unpack: Callable, fn_writer: _FN_WRITER): """ Register a custom archive type with associated file extensions and packing/unpacking functions. @@ -32,6 +123,8 @@ def register_archive_type(name: str, exts: List[str], fn_pack: Callable, fn_unpa :type fn_pack: Callable :param fn_unpack: The unpacking function that takes an archive filename and a directory as input and extracts the archive. :type fn_unpack: Callable + :param fn_writer: The writer creation function that takes an archive filename and creates an archive writer object. + :type fn_writer: Callable[[str], ArchiveWriter] :raises ValueError: If no file extensions are provided for the archive type. Example: @@ -45,7 +138,7 @@ def register_archive_type(name: str, exts: List[str], fn_pack: Callable, fn_unpa """ if len(exts) == 0: raise ValueError(f'At least one extension name for archive type {name!r} should be provided.') - _KNOWN_ARCHIVE_TYPES[name] = (exts, fn_pack, fn_unpack) + _KNOWN_ARCHIVE_TYPES[name] = (exts, fn_pack, fn_unpack, fn_writer) def get_archive_extname(type_name: str) -> str: @@ -65,7 +158,7 @@ def get_archive_extname(type_name: str) -> str: '.zip' """ if type_name in _KNOWN_ARCHIVE_TYPES: - exts, _, _ = _KNOWN_ARCHIVE_TYPES[type_name] + exts, _, _, _ = _KNOWN_ARCHIVE_TYPES[type_name] return exts[0] else: raise ValueError(f'Unknown archive type - {type_name!r}.') @@ -95,7 +188,7 @@ def archive_pack(type_name: str, directory: str, archive_file: str, Example: >>> archive_pack('zip', '/path/to/directory', '/path/to/archive.zip', pattern='*.txt') """ - exts, fn_pack, _ = _KNOWN_ARCHIVE_TYPES[type_name] + exts, fn_pack, _, _ = _KNOWN_ARCHIVE_TYPES[type_name] if not any(os.path.normcase(archive_file).endswith(extname) for extname in exts): warnings.warn(f'The archive type {type_name!r} should be one of the {exts!r}, ' f'but file name {archive_file!r} is assigned. ' @@ -122,7 +215,7 @@ def get_archive_type(archive_file: str) -> str: 'gztar' """ archive_file = os.path.normcase(archive_file) - for type_name, (exts, _, _) in _KNOWN_ARCHIVE_TYPES.items(): + for type_name, (exts, _, _, _) in _KNOWN_ARCHIVE_TYPES.items(): if any(archive_file.endswith(extname) for extname in exts): return type_name @@ -149,5 +242,33 @@ def archive_unpack(archive_file: str, directory: str, silent: bool = False, pass >>> archive_unpack('/path/to/archive.zip', '/path/to/extract') """ type_name = get_archive_type(archive_file) - _, _, fn_unpack = _KNOWN_ARCHIVE_TYPES[type_name] + _, _, fn_unpack, _ = _KNOWN_ARCHIVE_TYPES[type_name] return fn_unpack(archive_file, directory, silent=silent, password=password) + + +def archive_writer(type_name: str, archive_file: str) -> ArchiveWriter: + """ + Create an ArchiveWriter instance for the specified archive type. + + This function returns an ArchiveWriter that can be used to add files to an archive. + + :param type_name: The name of the archive type. + :type type_name: str + :param archive_file: The filename of the archive to be created or modified. + :type archive_file: str + :return: An ArchiveWriter instance for the specified archive type. + :rtype: ArchiveWriter + :raises ValueError: If the archive type is not registered. + + Example: + >>> writer = archive_writer('zip', '/path/to/archive.zip') + >>> with writer as w: + ... w.add('/path/to/file.txt', 'file.txt') + """ + exts, _, _, fn_writer = _KNOWN_ARCHIVE_TYPES[type_name] + if not any(os.path.normcase(archive_file).endswith(extname) for extname in exts): + warnings.warn(f'The archive type {type_name!r} should be one of the {exts!r}, ' + f'but file name {archive_file!r} is assigned. ' + f'We strongly recommend using a regular extension name for the archive file.') + + return fn_writer(archive_file) diff --git a/hfutils/archive/rar.py b/hfutils/archive/rar.py index a636f25c13d..f859419818f 100644 --- a/hfutils/archive/rar.py +++ b/hfutils/archive/rar.py @@ -11,7 +11,7 @@ import os from typing import Optional -from .base import register_archive_type +from .base import register_archive_type, ArchiveWriter try: import rarfile @@ -19,12 +19,61 @@ rarfile = None +class RARWriter(ArchiveWriter): + """ + A placeholder class for RAR archive writing operations. + + This class inherits from ArchiveWriter but does not implement actual RAR writing + functionality as it is not supported. + + :param archive_file: Path to the RAR archive file. + :type archive_file: str + :raises RuntimeError: Always raised as RAR writing is not supported. + """ + + def __init__(self, archive_file: str): + """ + Initialize the RAR writer. + + :param archive_file: Path to the RAR archive file. + :type archive_file: str + :raises RuntimeError: Always raised as RAR writing is not supported. + """ + super().__init__(archive_file) + raise RuntimeError('RAR format writing is not supported.') + + def _create_handler(self): + """ + Placeholder for creating a RAR file handler. + + :raises NotImplementedError: Always raised as RAR writing is not supported. + """ + raise NotImplementedError # pragma: no cover + + def _add_file(self, filename: str, arcname: str): + """ + Placeholder for adding a file to the RAR archive. + + :param filename: Path to the file to add. + :type filename: str + :param arcname: Name to give the file in the archive. + :type arcname: str + :raises NotImplementedError: Always raised as RAR writing is not supported. + """ + raise NotImplementedError # pragma: no cover + + def _rar_pack(directory, zip_file, pattern: Optional[str] = None, silent: bool = False, clear: bool = False): """ Placeholder function for RAR packing (not supported). + This function exists for API completeness but is not implemented as RAR + packing is not supported by the underlying library. + :param directory: The directory to pack. + :type directory: str or os.PathLike :param zip_file: The output RAR file. + :type zip_file: str or os.PathLike :param pattern: Optional pattern for file selection. :type pattern: str, optional :param silent: If True, suppress output. Defaults to False. @@ -41,8 +90,14 @@ def _rar_unpack(rar_file, directory, silent: bool = False, password: Optional[st """ Unpack a RAR file to a specified directory. + This function extracts all contents of a RAR archive to the specified directory. + It supports password-protected archives and will create the target directory + if it doesn't exist. + :param rar_file: The RAR file to unpack. + :type rar_file: str or os.PathLike :param directory: The directory to unpack the RAR file into. + :type directory: str or os.PathLike :param silent: If True, suppress output. Defaults to False. :type silent: bool :param password: Optional password for encrypted RAR files. @@ -58,4 +113,4 @@ def _rar_unpack(rar_file, directory, silent: bool = False, password: Optional[st if rarfile is not None: - register_archive_type('rar', ['.rar'], _rar_pack, _rar_unpack) + register_archive_type('rar', ['.rar'], _rar_pack, _rar_unpack, RARWriter) diff --git a/hfutils/archive/sevenz.py b/hfutils/archive/sevenz.py index 97a9f9fd7d4..6018cabe83c 100644 --- a/hfutils/archive/sevenz.py +++ b/hfutils/archive/sevenz.py @@ -11,7 +11,7 @@ import os from typing import Optional -from .base import register_archive_type +from .base import register_archive_type, ArchiveWriter from ..utils import tqdm, walk_files try: @@ -20,26 +20,62 @@ py7zr = None +class SevenZWriter(ArchiveWriter): + """ + A writer class for creating 7z archives. + + This class extends ArchiveWriter to provide specific functionality for + creating and writing to 7z archive files. + + :ivar archive_file: Path to the archive file being written + :vartype archive_file: str + """ + + def _create_handler(self): + """ + Create a new py7zr.SevenZipFile handler in write mode. + + :return: A new SevenZipFile handler + :rtype: py7zr.SevenZipFile + """ + return py7zr.SevenZipFile(self.archive_file, 'w') + + def _add_file(self, filename: str, arcname: str): + """ + Add a file to the 7z archive. + + :param filename: Path to the file to be added + :type filename: str + :param arcname: Name to be used for the file in the archive + :type arcname: str + """ + return self._handler.write(filename, arcname) + + def _7z_pack(directory, sz_file, pattern: Optional[str] = None, silent: bool = False, clear: bool = False): """ Pack files from a directory into a 7z archive. - :param directory: The source directory containing files to be packed. + This function creates a 7z archive containing files from the specified directory. + Files can be filtered using a pattern, and original files can optionally be removed + after packing. + + :param directory: The source directory containing files to be packed :type directory: str - :param sz_file: The path to the output 7z file. + :param sz_file: The path to the output 7z file :type sz_file: str - :param pattern: Optional file pattern to filter files for packing. + :param pattern: Optional file pattern to filter files for packing (e.g., "*.txt") :type pattern: str, optional - :param silent: If True, suppress progress output. + :param silent: If True, suppress progress output :type silent: bool, optional - :param clear: If True, remove source files after packing. + :param clear: If True, remove source files after packing :type clear: bool, optional """ - with py7zr.SevenZipFile(sz_file, 'w') as zf: + with SevenZWriter(sz_file) as zf: progress = tqdm(walk_files(directory, pattern=pattern), silent=silent, desc=f'Packing {directory!r} ...') for file in progress: progress.set_description(file) - zf.write(os.path.join(directory, file), file) + zf.add(os.path.join(directory, file), file) if clear: os.remove(os.path.join(directory, file)) @@ -48,14 +84,22 @@ def _7z_unpack(sz_file, directory, silent: bool = False, password: Optional[str] """ Unpack files from a 7z archive to a directory. - :param sz_file: The path to the 7z file to be unpacked. + This function extracts all files from a 7z archive to the specified directory. + It supports password-protected archives and will create the destination directory + if it doesn't exist. + + :param sz_file: The path to the 7z file to be unpacked :type sz_file: str - :param directory: The destination directory for unpacked files. + :param directory: The destination directory for unpacked files :type directory: str - :param silent: If True, suppress progress output (currently unused). + :param silent: If True, suppress progress output (currently unused) :type silent: bool, optional - :param password: Optional password for encrypted archives. + :param password: Optional password for encrypted archives :type password: str, optional + + .. note:: + The silent parameter is currently not used in the implementation but + is maintained for API consistency. """ _ = silent directory = os.fspath(directory) @@ -65,4 +109,4 @@ def _7z_unpack(sz_file, directory, silent: bool = False, password: Optional[str] if py7zr is not None: - register_archive_type('7z', ['.7z'], _7z_pack, _7z_unpack) + register_archive_type('7z', ['.7z'], _7z_pack, _7z_unpack, SevenZWriter) diff --git a/hfutils/archive/tar.py b/hfutils/archive/tar.py index 8aab9bb9474..ea9e28af99f 100644 --- a/hfutils/archive/tar.py +++ b/hfutils/archive/tar.py @@ -15,7 +15,7 @@ from functools import partial from typing import Literal, Optional -from .base import register_archive_type +from .base import register_archive_type, ArchiveWriter from .zip import _ZLIB_SUPPORTED from ..utils import walk_files, tqdm @@ -38,38 +38,93 @@ CompressTyping = Literal['', 'gzip', 'bzip2', 'xz'] +class TarWriter(ArchiveWriter): + """ + A class for writing tar archive files with various compression options. + + This class extends ArchiveWriter to provide specific functionality for + creating tar archives with different compression methods. + + :param archive_file: Path to the tar archive file to be created + :type archive_file: str + :param compress: Compression method to use + :type compress: CompressTyping + :raises ValueError: If an unsupported compression method is specified + + Usage:: + + with TarWriter('archive.tar.gz', compress='gzip') as tar: + tar.add('file.txt', 'file.txt') + """ + + def __init__(self, archive_file: str, compress: CompressTyping = "gzip"): + """ + Initialize a new TarWriter instance. + + :param archive_file: Path to the tar archive file to be created + :type archive_file: str + :param compress: Compression method to use ('', 'gzip', 'bzip2', 'xz') + :type compress: CompressTyping + :raises ValueError: If an unsupported compression method is specified + """ + super().__init__(archive_file) + if compress is None: + self._tar_compression = '' + elif compress == 'gzip': + self._tar_compression = 'gz' + elif compress == 'bzip2': + self._tar_compression = 'bz2' + elif compress == 'xz': + self._tar_compression = 'xz' + else: + raise ValueError("bad value for 'compress', or compression format not " + "supported : {0}".format(compress)) + + def _create_handler(self): + """ + Create and return a tarfile handler for writing. + + :return: A tarfile handler object + :rtype: tarfile.TarFile + """ + return tarfile.open(self.archive_file, f'w|{self._tar_compression}') + + def _add_file(self, filename: str, arcname: str): + """ + Add a file to the tar archive. + + :param filename: Path to the file to add + :type filename: str + :param arcname: Name to give the file in the archive + :type arcname: str + """ + return self._handler.add(filename, arcname) + + def _tarfile_pack(directory, tar_file, pattern: Optional[str] = None, compress: CompressTyping = "gzip", silent: bool = False, clear: bool = False): """ Pack a directory into a tar archive file with optional compression. - :param directory: The directory to pack. + This function walks through the specified directory and creates a tar archive + containing all matching files. It supports various compression methods and + can optionally remove source files after packing. + + :param directory: The directory to pack :type directory: str - :param tar_file: The name of the tar file to create. + :param tar_file: The name of the tar file to create :type tar_file: str - :param pattern: Optional file pattern to filter files for packing. + :param pattern: Optional file pattern to filter files for packing :type pattern: str, optional - :param compress: Compression method to use ('', 'gzip', 'bzip2', 'xz'). + :param compress: Compression method to use ('', 'gzip', 'bzip2', 'xz') :type compress: CompressTyping - :param silent: If True, suppress progress output. + :param silent: If True, suppress progress output :type silent: bool - :param clear: If True, remove packed files from the source directory. + :param clear: If True, remove packed files from the source directory :type clear: bool - :raises ValueError: If an unsupported compression method is specified. + :raises ValueError: If an unsupported compression method is specified """ - if compress is None: - tar_compression = '' - elif compress == 'gzip': - tar_compression = 'gz' - elif compress == 'bzip2': - tar_compression = 'bz2' - elif compress == 'xz': - tar_compression = 'xz' - else: - raise ValueError("bad value for 'compress', or compression format not " - "supported : {0}".format(compress)) - - with tarfile.open(tar_file, f'w|{tar_compression}') as tar: + with TarWriter(tar_file, compress=compress) as tar: progress = tqdm(walk_files(directory, pattern=pattern), silent=silent, desc=f'Packing {directory!r} ...') for file in progress: progress.set_description(file) @@ -82,15 +137,19 @@ def _tarfile_unpack(tar_file, directory, silent: bool = False, numeric_owner=Fal """ Unpack a tar archive file into a directory. - :param tar_file: The tar file to unpack. + This function extracts all files from a tar archive while preserving file + attributes and handling directory permissions properly. It supports progress + tracking and can handle various compression formats automatically. + + :param tar_file: The tar file to unpack :type tar_file: str - :param directory: The directory to unpack the files into. + :param directory: The directory to unpack the files into :type directory: str - :param silent: If True, suppress progress output. + :param silent: If True, suppress progress output :type silent: bool - :param numeric_owner: If True, use numeric owner (UID, GID) instead of names. + :param numeric_owner: If True, use numeric owner (UID, GID) instead of names :type numeric_owner: bool - :param password: Ignored for tar files (included for compatibility with other archive types). + :param password: Ignored for tar files (included for compatibility with other archive types) :type password: str, optional """ if password is not None: @@ -125,10 +184,30 @@ def _tarfile_unpack(tar_file, directory, silent: bool = False, numeric_owner=Fal # Register various tar archive types based on available compression libraries -register_archive_type('tar', ['.tar'], partial(_tarfile_pack, compress=None), _tarfile_unpack) +register_archive_type( + 'tar', ['.tar'], + partial(_tarfile_pack, compress=None), + _tarfile_unpack, + partial(TarWriter, compress=None), +) if _ZLIB_SUPPORTED: - register_archive_type('gztar', ['.tar.gz', '.tgz'], partial(_tarfile_pack, compress='gzip'), _tarfile_unpack) + register_archive_type( + 'gztar', ['.tar.gz', '.tgz'], + partial(_tarfile_pack, compress='gzip'), + _tarfile_unpack, + partial(TarWriter, compress='gzip'), + ) if _BZ2_SUPPORTED: - register_archive_type('bztar', ['.tar.bz2', '.tbz2'], partial(_tarfile_pack, compress='bzip2'), _tarfile_unpack) + register_archive_type( + 'bztar', ['.tar.bz2', '.tbz2'], + partial(_tarfile_pack, compress='bzip2'), + _tarfile_unpack, + partial(TarWriter, compress='bzip2'), + ) if _LZMA_SUPPORTED: - register_archive_type('xztar', ['.tar.xz', '.txz'], partial(_tarfile_pack, compress='xz'), _tarfile_unpack) + register_archive_type( + 'xztar', ['.tar.xz', '.txz'], + partial(_tarfile_pack, compress='xz'), + _tarfile_unpack, + partial(TarWriter, compress='xz'), + ) diff --git a/hfutils/archive/zip.py b/hfutils/archive/zip.py index 922cc16bf67..1d6748fc64f 100644 --- a/hfutils/archive/zip.py +++ b/hfutils/archive/zip.py @@ -9,7 +9,7 @@ import zipfile from typing import Optional -from .base import register_archive_type +from .base import register_archive_type, ArchiveWriter from ..utils import tqdm, walk_files try: @@ -21,26 +21,65 @@ _ZLIB_SUPPORTED = False +class ZipWriter(ArchiveWriter): + """ + A specialized archive writer for ZIP files. + + This class extends the base ArchiveWriter to provide ZIP-specific functionality, + implementing the ZIP_DEFLATED compression method for file writing. + + Methods: + _create_handler: Creates a new ZIP file handler + _add_file: Adds a file to the ZIP archive + """ + + def _create_handler(self): + """ + Create a new ZIP file handler with deflate compression. + + :return: A ZipFile instance configured for writing with compression + :rtype: zipfile.ZipFile + """ + return zipfile.ZipFile(self.archive_file, "w", compression=zipfile.ZIP_DEFLATED) + + def _add_file(self, filename: str, arcname: str): + """ + Add a file to the ZIP archive. + + :param filename: The path to the file to add + :type filename: str + :param arcname: The name to give the file within the archive + :type arcname: str + :return: None + """ + return self._handler.write(filename, arcname) + + def _zip_pack(directory, zip_file, pattern: Optional[str] = None, silent: bool = False, clear: bool = False): """ Pack a directory into a ZIP file. - :param directory: The directory to pack. + This function creates a ZIP archive containing all files from the specified directory. + It supports file filtering through patterns and can optionally remove source files + after successful packing. + + :param directory: The directory to pack :type directory: str - :param zip_file: The path to the output ZIP file. + :param zip_file: The path to the output ZIP file :type zip_file: str - :param pattern: Optional file pattern to filter files for packing. + :param pattern: Optional file pattern to filter files for packing :type pattern: str, optional - :param silent: If True, suppress progress output. + :param silent: If True, suppress progress output :type silent: bool - :param clear: If True, remove original files after packing. + :param clear: If True, remove original files after packing :type clear: bool """ - with zipfile.ZipFile(zip_file, "w", compression=zipfile.ZIP_DEFLATED) as zf: - progress = tqdm(walk_files(directory, pattern=pattern), silent=silent, desc=f'Packing {directory!r} ...') + with ZipWriter(zip_file) as zf: + progress = tqdm(walk_files(directory, pattern=pattern), + silent=silent, desc=f'Packing {directory!r} ...') for file in progress: progress.set_description(file) - zf.write(os.path.join(directory, file), file) + zf.add(os.path.join(directory, file), file) if clear: os.remove(os.path.join(directory, file)) @@ -49,13 +88,16 @@ def _zip_unpack(zip_file, directory, silent: bool = False, password: Optional[st """ Unpack a ZIP file into a directory. - :param zip_file: The path to the ZIP file to unpack. + This function extracts all contents of a ZIP file into the specified directory. + It supports password-protected archives and provides progress tracking during extraction. + + :param zip_file: The path to the ZIP file to unpack :type zip_file: str - :param directory: The directory to unpack the ZIP file into. + :param directory: The directory to unpack the ZIP file into :type directory: str - :param silent: If True, suppress progress output. + :param silent: If True, suppress progress output :type silent: bool - :param password: Optional password for encrypted ZIP files. + :param password: Optional password for encrypted ZIP files :type password: str, optional """ directory = os.fspath(directory) @@ -70,4 +112,4 @@ def _zip_unpack(zip_file, directory, silent: bool = False, password: Optional[st if _ZLIB_SUPPORTED: - register_archive_type('zip', ['.zip'], _zip_pack, _zip_unpack) + register_archive_type('zip', ['.zip'], _zip_pack, _zip_unpack, ZipWriter) diff --git a/test/archive/test_base.py b/test/archive/test_base.py index dd35040a963..eda919d0a35 100644 --- a/test/archive/test_base.py +++ b/test/archive/test_base.py @@ -33,4 +33,4 @@ def test_pack_with_warning(self, raw_dir): def test_empty_register(self): with pytest.raises(ValueError): - register_archive_type('xxx', [], lambda: None, lambda: None) + register_archive_type('xxx', [], lambda: None, lambda: None, lambda x: None) diff --git a/test/archive/test_rar.py b/test/archive/test_rar.py index 7da0e82ac45..bb65b0cdd50 100644 --- a/test/archive/test_rar.py +++ b/test/archive/test_rar.py @@ -4,7 +4,7 @@ import pytest from hbutils.testing import isolated_directory, disable_output -from hfutils.archive import get_archive_type, get_archive_extname, archive_pack, archive_unpack +from hfutils.archive import get_archive_type, get_archive_extname, archive_pack, archive_unpack, archive_writer from hfutils.utils import walk_files from test.testings import get_testfile @@ -56,6 +56,12 @@ def test_archive_pack(self, raw_dir, check_unpack_dir): archive_pack('rar', raw_dir, 'pack.rar') assert len(list(walk_files(raw_dir))) == origin_files + @skipUnless(rarfile, 'rarfile module required.') + def test_archive_writer(self, raw_dir, check_unpack_dir): + with isolated_directory(): + with disable_output(), pytest.raises(RuntimeError): + archive_writer('rar', 'pack.rar') + @skipUnless(rarfile, 'rarfile module required.') def test_archive_unpack(self, raw_rar, check_unpack_dir): with isolated_directory(): diff --git a/test/archive/test_sevenz.py b/test/archive/test_sevenz.py index 32be41b56ca..ee0fccadeea 100644 --- a/test/archive/test_sevenz.py +++ b/test/archive/test_sevenz.py @@ -1,12 +1,13 @@ +import glob import os.path from unittest import skipUnless import pytest -from hbutils.testing import isolated_directory, disable_output +from hbutils.testing import isolated_directory, disable_output, tmatrix -from hfutils.archive import get_archive_type, get_archive_extname, archive_pack, archive_unpack +from hfutils.archive import get_archive_type, get_archive_extname, archive_pack, archive_unpack, archive_writer from hfutils.utils import walk_files -from test.testings import get_testfile +from test.testings import get_testfile, dir_compare try: import py7zr @@ -93,3 +94,22 @@ def test_archive_unpack_with_password(self, raw_password_7z, check_unpack_dir): with disable_output(): archive_unpack(raw_password_7z, '.', password='password') check_unpack_dir('.') + + @skipUnless(py7zr, 'py7zr module required.') + @pytest.mark.parametrize(*tmatrix({ + 'ext': ['bin', 'binary', 'bst'], + 'type_': ['7z'], + })) + def test_archive_writer(self, ext, type_): + src_dir = get_testfile('complex_directory') + dst_dir = get_testfile(f'complex_directory_{ext}') + + with isolated_directory(): + archive_file = f'archive.{type_}' + with archive_writer(type_, archive_file) as af: + for file in glob.glob(os.path.join(src_dir, '**', f'*.{ext}'), recursive=True): + af.add(file, os.path.basename(file)) + + archive_unpack(archive_file, '.', silent=True) + os.remove(archive_file) + dir_compare('.', dst_dir) diff --git a/test/archive/test_tar.py b/test/archive/test_tar.py index b5da3775665..4b4091a4995 100644 --- a/test/archive/test_tar.py +++ b/test/archive/test_tar.py @@ -1,12 +1,13 @@ +import glob import os.path import tarfile import pytest -from hbutils.testing import isolated_directory, disable_output +from hbutils.testing import isolated_directory, disable_output, tmatrix -from hfutils.archive import get_archive_type, get_archive_extname, archive_pack, archive_unpack +from hfutils.archive import get_archive_type, get_archive_extname, archive_pack, archive_unpack, archive_writer from hfutils.utils import walk_files -from test.testings import get_testfile +from test.testings import get_testfile, dir_compare @pytest.fixture() @@ -83,3 +84,26 @@ def test_archive_unpack_password_ignore(self, check_unpack_dir, type_, ext): with disable_output(), pytest.warns(UserWarning): archive_unpack(get_testfile(f'raw{ext}'), '.', password='password') check_unpack_dir('.') + + @pytest.mark.parametrize(*tmatrix({ + 'ext': ['bin', 'binary', 'bst'], + ('type_', 'type_ext'): [ + ('tar', '.tar'), + ('gztar', '.tar.gz'), + ('bztar', '.tar.bz2'), + ('xztar', '.tar.xz'), + ], + })) + def test_archive_writer(self, ext, type_, type_ext): + src_dir = get_testfile('complex_directory') + dst_dir = get_testfile(f'complex_directory_{ext}') + + with isolated_directory(): + archive_file = f'archive.{type_ext}' + with archive_writer(type_, archive_file) as af: + for file in glob.glob(os.path.join(src_dir, '**', f'*.{ext}'), recursive=True): + af.add(file, os.path.basename(file)) + + archive_unpack(archive_file, '.', silent=True) + os.remove(archive_file) + dir_compare('.', dst_dir) diff --git a/test/archive/test_zip.py b/test/archive/test_zip.py index f0263beb159..b72d6be5473 100644 --- a/test/archive/test_zip.py +++ b/test/archive/test_zip.py @@ -1,12 +1,13 @@ +import glob import os.path import zipfile import pytest -from hbutils.testing import isolated_directory, disable_output +from hbutils.testing import isolated_directory, disable_output, tmatrix -from hfutils.archive import get_archive_type, get_archive_extname, archive_pack, archive_unpack +from hfutils.archive import get_archive_type, get_archive_extname, archive_pack, archive_unpack, archive_writer from hfutils.utils import walk_files -from test.testings import get_testfile +from test.testings import get_testfile, dir_compare @pytest.fixture() @@ -69,3 +70,21 @@ def test_archive_unpack_with_password(self, raw_password_zip, check_unpack_dir): with disable_output(): archive_unpack(raw_password_zip, '.', password='password') check_unpack_dir('.') + + @pytest.mark.parametrize(*tmatrix({ + 'ext': ['bin', 'binary', 'bst'], + 'type_': ['zip'], + })) + def test_archive_writer(self, ext, type_): + src_dir = get_testfile('complex_directory') + dst_dir = get_testfile(f'complex_directory_{ext}') + + with isolated_directory(): + archive_file = f'archive.{type_}' + with archive_writer(type_, archive_file) as af: + for file in glob.glob(os.path.join(src_dir, '**', f'*.{ext}'), recursive=True): + af.add(file, os.path.basename(file)) + + archive_unpack(archive_file, '.', silent=True) + os.remove(archive_file) + dir_compare('.', dst_dir) diff --git a/test/testfile/complex_directory/0/00009.bst b/test/testfile/complex_directory/0/00009.bst new file mode 100644 index 00000000000..48c96f94855 Binary files /dev/null and b/test/testfile/complex_directory/0/00009.bst differ diff --git a/test/testfile/complex_directory/0/00014.bin b/test/testfile/complex_directory/0/00014.bin new file mode 100644 index 00000000000..57c13c2173a Binary files /dev/null and b/test/testfile/complex_directory/0/00014.bin differ diff --git a/test/testfile/complex_directory/0/00025.bin b/test/testfile/complex_directory/0/00025.bin new file mode 100644 index 00000000000..ccb6987af51 Binary files /dev/null and b/test/testfile/complex_directory/0/00025.bin differ diff --git a/test/testfile/complex_directory/0/00052.binary b/test/testfile/complex_directory/0/00052.binary new file mode 100644 index 00000000000..b338c8e3c29 Binary files /dev/null and b/test/testfile/complex_directory/0/00052.binary differ diff --git a/test/testfile/complex_directory/0/00069.bst b/test/testfile/complex_directory/0/00069.bst new file mode 100644 index 00000000000..d6c7562b6f9 Binary files /dev/null and b/test/testfile/complex_directory/0/00069.bst differ diff --git a/test/testfile/complex_directory/0/00072.bin b/test/testfile/complex_directory/0/00072.bin new file mode 100644 index 00000000000..379650c5848 Binary files /dev/null and b/test/testfile/complex_directory/0/00072.bin differ diff --git a/test/testfile/complex_directory/0/00088.binary b/test/testfile/complex_directory/0/00088.binary new file mode 100644 index 00000000000..80583fa7d6f Binary files /dev/null and b/test/testfile/complex_directory/0/00088.binary differ diff --git a/test/testfile/complex_directory/0/00092.binary b/test/testfile/complex_directory/0/00092.binary new file mode 100644 index 00000000000..e39732e0bb4 Binary files /dev/null and b/test/testfile/complex_directory/0/00092.binary differ diff --git a/test/testfile/complex_directory/0/00093.bin b/test/testfile/complex_directory/0/00093.bin new file mode 100644 index 00000000000..ca1fc094716 Binary files /dev/null and b/test/testfile/complex_directory/0/00093.bin differ diff --git a/test/testfile/complex_directory/00003.bst b/test/testfile/complex_directory/00003.bst new file mode 100644 index 00000000000..f8cb15f7717 --- /dev/null +++ b/test/testfile/complex_directory/00003.bst @@ -0,0 +1 @@ +zC]#=W:'u^Ա*j 7W<.A[PLVn \ No newline at end of file diff --git a/test/testfile/complex_directory/00005.bin b/test/testfile/complex_directory/00005.bin new file mode 100644 index 00000000000..5f37b6ea934 Binary files /dev/null and b/test/testfile/complex_directory/00005.bin differ diff --git a/test/testfile/complex_directory/00029.bst b/test/testfile/complex_directory/00029.bst new file mode 100644 index 00000000000..1d81e68e4d7 Binary files /dev/null and b/test/testfile/complex_directory/00029.bst differ diff --git a/test/testfile/complex_directory/00035.bst b/test/testfile/complex_directory/00035.bst new file mode 100644 index 00000000000..96af4289d08 Binary files /dev/null and b/test/testfile/complex_directory/00035.bst differ diff --git a/test/testfile/complex_directory/00042.bst b/test/testfile/complex_directory/00042.bst new file mode 100644 index 00000000000..31993df0b49 Binary files /dev/null and b/test/testfile/complex_directory/00042.bst differ diff --git a/test/testfile/complex_directory/00048.bst b/test/testfile/complex_directory/00048.bst new file mode 100644 index 00000000000..645918b4849 Binary files /dev/null and b/test/testfile/complex_directory/00048.bst differ diff --git a/test/testfile/complex_directory/00084.bst b/test/testfile/complex_directory/00084.bst new file mode 100644 index 00000000000..3e0138be577 Binary files /dev/null and b/test/testfile/complex_directory/00084.bst differ diff --git a/test/testfile/complex_directory/00094.binary b/test/testfile/complex_directory/00094.binary new file mode 100644 index 00000000000..2ce0b11336d Binary files /dev/null and b/test/testfile/complex_directory/00094.binary differ diff --git a/test/testfile/complex_directory/1/00002.bst b/test/testfile/complex_directory/1/00002.bst new file mode 100644 index 00000000000..3fa894c7d04 Binary files /dev/null and b/test/testfile/complex_directory/1/00002.bst differ diff --git a/test/testfile/complex_directory/1/00011.bin b/test/testfile/complex_directory/1/00011.bin new file mode 100644 index 00000000000..77b58b8004c Binary files /dev/null and b/test/testfile/complex_directory/1/00011.bin differ diff --git a/test/testfile/complex_directory/1/00051.bin b/test/testfile/complex_directory/1/00051.bin new file mode 100644 index 00000000000..0ab3a17a696 Binary files /dev/null and b/test/testfile/complex_directory/1/00051.bin differ diff --git a/test/testfile/complex_directory/1/00059.bst b/test/testfile/complex_directory/1/00059.bst new file mode 100644 index 00000000000..14d1389ad4e Binary files /dev/null and b/test/testfile/complex_directory/1/00059.bst differ diff --git a/test/testfile/complex_directory/1/00073.binary b/test/testfile/complex_directory/1/00073.binary new file mode 100644 index 00000000000..75286342f72 Binary files /dev/null and b/test/testfile/complex_directory/1/00073.binary differ diff --git a/test/testfile/complex_directory/1/00078.bst b/test/testfile/complex_directory/1/00078.bst new file mode 100644 index 00000000000..3989862ee01 Binary files /dev/null and b/test/testfile/complex_directory/1/00078.bst differ diff --git a/test/testfile/complex_directory/1/00082.bin b/test/testfile/complex_directory/1/00082.bin new file mode 100644 index 00000000000..64fc1288ab5 Binary files /dev/null and b/test/testfile/complex_directory/1/00082.bin differ diff --git a/test/testfile/complex_directory/2/00015.bst b/test/testfile/complex_directory/2/00015.bst new file mode 100644 index 00000000000..cbd7ecf386f Binary files /dev/null and b/test/testfile/complex_directory/2/00015.bst differ diff --git a/test/testfile/complex_directory/2/00016.binary b/test/testfile/complex_directory/2/00016.binary new file mode 100644 index 00000000000..8c05d8b7e37 Binary files /dev/null and b/test/testfile/complex_directory/2/00016.binary differ diff --git a/test/testfile/complex_directory/2/00021.binary b/test/testfile/complex_directory/2/00021.binary new file mode 100644 index 00000000000..02a730a0650 Binary files /dev/null and b/test/testfile/complex_directory/2/00021.binary differ diff --git a/test/testfile/complex_directory/x/0/00031.bst b/test/testfile/complex_directory/x/0/00031.bst new file mode 100644 index 00000000000..5b7abd0bee8 Binary files /dev/null and b/test/testfile/complex_directory/x/0/00031.bst differ diff --git a/test/testfile/complex_directory/x/0/00033.binary b/test/testfile/complex_directory/x/0/00033.binary new file mode 100644 index 00000000000..8d0aee67137 Binary files /dev/null and b/test/testfile/complex_directory/x/0/00033.binary differ diff --git a/test/testfile/complex_directory/x/0/00050.bin b/test/testfile/complex_directory/x/0/00050.bin new file mode 100644 index 00000000000..4d937fce3c1 Binary files /dev/null and b/test/testfile/complex_directory/x/0/00050.bin differ diff --git a/test/testfile/complex_directory/x/0/00053.binary b/test/testfile/complex_directory/x/0/00053.binary new file mode 100644 index 00000000000..ae241c85001 Binary files /dev/null and b/test/testfile/complex_directory/x/0/00053.binary differ diff --git a/test/testfile/complex_directory/x/0/00065.binary b/test/testfile/complex_directory/x/0/00065.binary new file mode 100644 index 00000000000..b8f8de43c39 Binary files /dev/null and b/test/testfile/complex_directory/x/0/00065.binary differ diff --git a/test/testfile/complex_directory/x/0/00096.bst b/test/testfile/complex_directory/x/0/00096.bst new file mode 100644 index 00000000000..e1e70d687c3 Binary files /dev/null and b/test/testfile/complex_directory/x/0/00096.bst differ diff --git a/test/testfile/complex_directory/x/0/00097.bst b/test/testfile/complex_directory/x/0/00097.bst new file mode 100644 index 00000000000..ba322574ed3 Binary files /dev/null and b/test/testfile/complex_directory/x/0/00097.bst differ diff --git a/test/testfile/complex_directory/x/0/00098.bin b/test/testfile/complex_directory/x/0/00098.bin new file mode 100644 index 00000000000..de0f71920b3 Binary files /dev/null and b/test/testfile/complex_directory/x/0/00098.bin differ diff --git a/test/testfile/complex_directory/x/00006.bst b/test/testfile/complex_directory/x/00006.bst new file mode 100644 index 00000000000..3c01ba96af5 Binary files /dev/null and b/test/testfile/complex_directory/x/00006.bst differ diff --git a/test/testfile/complex_directory/x/00010.bst b/test/testfile/complex_directory/x/00010.bst new file mode 100644 index 00000000000..361667fc124 Binary files /dev/null and b/test/testfile/complex_directory/x/00010.bst differ diff --git a/test/testfile/complex_directory/x/00012.bin b/test/testfile/complex_directory/x/00012.bin new file mode 100644 index 00000000000..d9116eb8cba Binary files /dev/null and b/test/testfile/complex_directory/x/00012.bin differ diff --git a/test/testfile/complex_directory/x/00027.bin b/test/testfile/complex_directory/x/00027.bin new file mode 100644 index 00000000000..e0f13bb7cb8 Binary files /dev/null and b/test/testfile/complex_directory/x/00027.bin differ diff --git a/test/testfile/complex_directory/x/00045.bin b/test/testfile/complex_directory/x/00045.bin new file mode 100644 index 00000000000..9f9c9b9b788 Binary files /dev/null and b/test/testfile/complex_directory/x/00045.bin differ diff --git a/test/testfile/complex_directory/x/00046.bst b/test/testfile/complex_directory/x/00046.bst new file mode 100644 index 00000000000..43d2b229b6f Binary files /dev/null and b/test/testfile/complex_directory/x/00046.bst differ diff --git a/test/testfile/complex_directory/x/00060.bst b/test/testfile/complex_directory/x/00060.bst new file mode 100644 index 00000000000..7e26f016632 Binary files /dev/null and b/test/testfile/complex_directory/x/00060.bst differ diff --git a/test/testfile/complex_directory/x/00062.binary b/test/testfile/complex_directory/x/00062.binary new file mode 100644 index 00000000000..6f72aea6d66 Binary files /dev/null and b/test/testfile/complex_directory/x/00062.binary differ diff --git a/test/testfile/complex_directory/x/00076.binary b/test/testfile/complex_directory/x/00076.binary new file mode 100644 index 00000000000..d5773de6449 Binary files /dev/null and b/test/testfile/complex_directory/x/00076.binary differ diff --git a/test/testfile/complex_directory/x/00079.bst b/test/testfile/complex_directory/x/00079.bst new file mode 100644 index 00000000000..9e4ccb282b3 Binary files /dev/null and b/test/testfile/complex_directory/x/00079.bst differ diff --git a/test/testfile/complex_directory/x/00086.binary b/test/testfile/complex_directory/x/00086.binary new file mode 100644 index 00000000000..75012eb3376 Binary files /dev/null and b/test/testfile/complex_directory/x/00086.binary differ diff --git a/test/testfile/complex_directory/x/00089.binary b/test/testfile/complex_directory/x/00089.binary new file mode 100644 index 00000000000..ad4697ecc1c Binary files /dev/null and b/test/testfile/complex_directory/x/00089.binary differ diff --git a/test/testfile/complex_directory/x/1/00008.binary b/test/testfile/complex_directory/x/1/00008.binary new file mode 100644 index 00000000000..50b6f82927b Binary files /dev/null and b/test/testfile/complex_directory/x/1/00008.binary differ diff --git a/test/testfile/complex_directory/x/1/00019.bst b/test/testfile/complex_directory/x/1/00019.bst new file mode 100644 index 00000000000..299d105e0c9 Binary files /dev/null and b/test/testfile/complex_directory/x/1/00019.bst differ diff --git a/test/testfile/complex_directory/x/1/00022.bst b/test/testfile/complex_directory/x/1/00022.bst new file mode 100644 index 00000000000..04ac26d4064 Binary files /dev/null and b/test/testfile/complex_directory/x/1/00022.bst differ diff --git a/test/testfile/complex_directory/x/1/00024.binary b/test/testfile/complex_directory/x/1/00024.binary new file mode 100644 index 00000000000..d871cd108ac Binary files /dev/null and b/test/testfile/complex_directory/x/1/00024.binary differ diff --git a/test/testfile/complex_directory/x/1/00040.bst b/test/testfile/complex_directory/x/1/00040.bst new file mode 100644 index 00000000000..af89367c82e Binary files /dev/null and b/test/testfile/complex_directory/x/1/00040.bst differ diff --git a/test/testfile/complex_directory/x/1/00043.binary b/test/testfile/complex_directory/x/1/00043.binary new file mode 100644 index 00000000000..1c5a5663a0e Binary files /dev/null and b/test/testfile/complex_directory/x/1/00043.binary differ diff --git a/test/testfile/complex_directory/x/1/00044.bst b/test/testfile/complex_directory/x/1/00044.bst new file mode 100644 index 00000000000..6342a4d3082 Binary files /dev/null and b/test/testfile/complex_directory/x/1/00044.bst differ diff --git a/test/testfile/complex_directory/x/1/00049.binary b/test/testfile/complex_directory/x/1/00049.binary new file mode 100644 index 00000000000..f79db0d0858 Binary files /dev/null and b/test/testfile/complex_directory/x/1/00049.binary differ diff --git a/test/testfile/complex_directory/x/1/00067.bin b/test/testfile/complex_directory/x/1/00067.bin new file mode 100644 index 00000000000..cdb8a914ae7 Binary files /dev/null and b/test/testfile/complex_directory/x/1/00067.bin differ diff --git a/test/testfile/complex_directory/x/1/00068.bst b/test/testfile/complex_directory/x/1/00068.bst new file mode 100644 index 00000000000..edb97c753ff Binary files /dev/null and b/test/testfile/complex_directory/x/1/00068.bst differ diff --git a/test/testfile/complex_directory/x/1/00087.bst b/test/testfile/complex_directory/x/1/00087.bst new file mode 100644 index 00000000000..d36551922fb Binary files /dev/null and b/test/testfile/complex_directory/x/1/00087.bst differ diff --git a/test/testfile/complex_directory/x/2/00007.binary b/test/testfile/complex_directory/x/2/00007.binary new file mode 100644 index 00000000000..08c7fd6c727 Binary files /dev/null and b/test/testfile/complex_directory/x/2/00007.binary differ diff --git a/test/testfile/complex_directory/x/2/00023.bst b/test/testfile/complex_directory/x/2/00023.bst new file mode 100644 index 00000000000..30f0d056521 Binary files /dev/null and b/test/testfile/complex_directory/x/2/00023.bst differ diff --git a/test/testfile/complex_directory/x/2/00032.bst b/test/testfile/complex_directory/x/2/00032.bst new file mode 100644 index 00000000000..8dde9024d0d Binary files /dev/null and b/test/testfile/complex_directory/x/2/00032.bst differ diff --git a/test/testfile/complex_directory/x/2/00038.bst b/test/testfile/complex_directory/x/2/00038.bst new file mode 100644 index 00000000000..89d63bce487 Binary files /dev/null and b/test/testfile/complex_directory/x/2/00038.bst differ diff --git a/test/testfile/complex_directory/x/2/00039.bin b/test/testfile/complex_directory/x/2/00039.bin new file mode 100644 index 00000000000..b70d1746d2c Binary files /dev/null and b/test/testfile/complex_directory/x/2/00039.bin differ diff --git a/test/testfile/complex_directory/x/2/00041.binary b/test/testfile/complex_directory/x/2/00041.binary new file mode 100644 index 00000000000..82f703a2143 Binary files /dev/null and b/test/testfile/complex_directory/x/2/00041.binary differ diff --git a/test/testfile/complex_directory/x/2/00054.bin b/test/testfile/complex_directory/x/2/00054.bin new file mode 100644 index 00000000000..e1fd75041f5 Binary files /dev/null and b/test/testfile/complex_directory/x/2/00054.bin differ diff --git a/test/testfile/complex_directory/x/2/00057.bst b/test/testfile/complex_directory/x/2/00057.bst new file mode 100644 index 00000000000..1ad4661fb75 Binary files /dev/null and b/test/testfile/complex_directory/x/2/00057.bst differ diff --git a/test/testfile/complex_directory/x/2/00061.bst b/test/testfile/complex_directory/x/2/00061.bst new file mode 100644 index 00000000000..635523fbb13 Binary files /dev/null and b/test/testfile/complex_directory/x/2/00061.bst differ diff --git a/test/testfile/complex_directory/x/2/00064.binary b/test/testfile/complex_directory/x/2/00064.binary new file mode 100644 index 00000000000..b8766dfc8ec Binary files /dev/null and b/test/testfile/complex_directory/x/2/00064.binary differ diff --git a/test/testfile/complex_directory/x/2/00074.bst b/test/testfile/complex_directory/x/2/00074.bst new file mode 100644 index 00000000000..3d2fe3d916e Binary files /dev/null and b/test/testfile/complex_directory/x/2/00074.bst differ diff --git a/test/testfile/complex_directory/x/2/00080.bst b/test/testfile/complex_directory/x/2/00080.bst new file mode 100644 index 00000000000..2de8f3968af Binary files /dev/null and b/test/testfile/complex_directory/x/2/00080.bst differ diff --git a/test/testfile/complex_directory/x/2/00085.bin b/test/testfile/complex_directory/x/2/00085.bin new file mode 100644 index 00000000000..1587b7f1b6e Binary files /dev/null and b/test/testfile/complex_directory/x/2/00085.bin differ diff --git a/test/testfile/complex_directory/y/0/00000.binary b/test/testfile/complex_directory/y/0/00000.binary new file mode 100644 index 00000000000..18f9e119f90 Binary files /dev/null and b/test/testfile/complex_directory/y/0/00000.binary differ diff --git a/test/testfile/complex_directory/y/0/00004.binary b/test/testfile/complex_directory/y/0/00004.binary new file mode 100644 index 00000000000..e396bf63c33 Binary files /dev/null and b/test/testfile/complex_directory/y/0/00004.binary differ diff --git a/test/testfile/complex_directory/y/0/00017.binary b/test/testfile/complex_directory/y/0/00017.binary new file mode 100644 index 00000000000..f67c9d3045a Binary files /dev/null and b/test/testfile/complex_directory/y/0/00017.binary differ diff --git a/test/testfile/complex_directory/y/0/00028.bin b/test/testfile/complex_directory/y/0/00028.bin new file mode 100644 index 00000000000..850cb34cb24 Binary files /dev/null and b/test/testfile/complex_directory/y/0/00028.bin differ diff --git a/test/testfile/complex_directory/y/0/00030.bst b/test/testfile/complex_directory/y/0/00030.bst new file mode 100644 index 00000000000..ccbe3db9c99 Binary files /dev/null and b/test/testfile/complex_directory/y/0/00030.bst differ diff --git a/test/testfile/complex_directory/y/0/00034.bin b/test/testfile/complex_directory/y/0/00034.bin new file mode 100644 index 00000000000..31d33c3d171 Binary files /dev/null and b/test/testfile/complex_directory/y/0/00034.bin differ diff --git a/test/testfile/complex_directory/y/0/00036.bin b/test/testfile/complex_directory/y/0/00036.bin new file mode 100644 index 00000000000..8408e5c434b Binary files /dev/null and b/test/testfile/complex_directory/y/0/00036.bin differ diff --git a/test/testfile/complex_directory/y/0/00037.bst b/test/testfile/complex_directory/y/0/00037.bst new file mode 100644 index 00000000000..2c2a19e3bf6 Binary files /dev/null and b/test/testfile/complex_directory/y/0/00037.bst differ diff --git a/test/testfile/complex_directory/y/0/00058.bin b/test/testfile/complex_directory/y/0/00058.bin new file mode 100644 index 00000000000..f6d0e3661e3 Binary files /dev/null and b/test/testfile/complex_directory/y/0/00058.bin differ diff --git a/test/testfile/complex_directory/y/0/00063.bst b/test/testfile/complex_directory/y/0/00063.bst new file mode 100644 index 00000000000..325f9552929 Binary files /dev/null and b/test/testfile/complex_directory/y/0/00063.bst differ diff --git a/test/testfile/complex_directory/y/0/00081.bst b/test/testfile/complex_directory/y/0/00081.bst new file mode 100644 index 00000000000..6919af4574b Binary files /dev/null and b/test/testfile/complex_directory/y/0/00081.bst differ diff --git a/test/testfile/complex_directory/y/0/00099.binary b/test/testfile/complex_directory/y/0/00099.binary new file mode 100644 index 00000000000..4560a6523ed Binary files /dev/null and b/test/testfile/complex_directory/y/0/00099.binary differ diff --git a/test/testfile/complex_directory/y/00001.binary b/test/testfile/complex_directory/y/00001.binary new file mode 100644 index 00000000000..b272bfa2a27 Binary files /dev/null and b/test/testfile/complex_directory/y/00001.binary differ diff --git a/test/testfile/complex_directory/y/00020.bst b/test/testfile/complex_directory/y/00020.bst new file mode 100644 index 00000000000..ab62ef5d937 Binary files /dev/null and b/test/testfile/complex_directory/y/00020.bst differ diff --git a/test/testfile/complex_directory/y/00026.bin b/test/testfile/complex_directory/y/00026.bin new file mode 100644 index 00000000000..da18682af30 Binary files /dev/null and b/test/testfile/complex_directory/y/00026.bin differ diff --git a/test/testfile/complex_directory/y/00071.bin b/test/testfile/complex_directory/y/00071.bin new file mode 100644 index 00000000000..eb92b18b6e5 Binary files /dev/null and b/test/testfile/complex_directory/y/00071.bin differ diff --git a/test/testfile/complex_directory/y/00075.bin b/test/testfile/complex_directory/y/00075.bin new file mode 100644 index 00000000000..e5a5c4518ed Binary files /dev/null and b/test/testfile/complex_directory/y/00075.bin differ diff --git a/test/testfile/complex_directory/y/00090.binary b/test/testfile/complex_directory/y/00090.binary new file mode 100644 index 00000000000..fa057c9391e Binary files /dev/null and b/test/testfile/complex_directory/y/00090.binary differ diff --git a/test/testfile/complex_directory/y/00091.bin b/test/testfile/complex_directory/y/00091.bin new file mode 100644 index 00000000000..2748eb60618 Binary files /dev/null and b/test/testfile/complex_directory/y/00091.bin differ diff --git a/test/testfile/complex_directory/y/1/00056.bin b/test/testfile/complex_directory/y/1/00056.bin new file mode 100644 index 00000000000..66c795e2fc2 Binary files /dev/null and b/test/testfile/complex_directory/y/1/00056.bin differ diff --git a/test/testfile/complex_directory/y/1/00095.bin b/test/testfile/complex_directory/y/1/00095.bin new file mode 100644 index 00000000000..6a0451c845b Binary files /dev/null and b/test/testfile/complex_directory/y/1/00095.bin differ diff --git a/test/testfile/complex_directory/y/2/00013.bst b/test/testfile/complex_directory/y/2/00013.bst new file mode 100644 index 00000000000..d0ac3ef7785 Binary files /dev/null and b/test/testfile/complex_directory/y/2/00013.bst differ diff --git a/test/testfile/complex_directory/y/2/00018.bin b/test/testfile/complex_directory/y/2/00018.bin new file mode 100644 index 00000000000..416b205460e Binary files /dev/null and b/test/testfile/complex_directory/y/2/00018.bin differ diff --git a/test/testfile/complex_directory/y/2/00047.binary b/test/testfile/complex_directory/y/2/00047.binary new file mode 100644 index 00000000000..2394fbf28da Binary files /dev/null and b/test/testfile/complex_directory/y/2/00047.binary differ diff --git a/test/testfile/complex_directory/y/2/00055.binary b/test/testfile/complex_directory/y/2/00055.binary new file mode 100644 index 00000000000..ba206e2f333 Binary files /dev/null and b/test/testfile/complex_directory/y/2/00055.binary differ diff --git a/test/testfile/complex_directory/y/2/00066.binary b/test/testfile/complex_directory/y/2/00066.binary new file mode 100644 index 00000000000..3453412070a Binary files /dev/null and b/test/testfile/complex_directory/y/2/00066.binary differ diff --git a/test/testfile/complex_directory/y/2/00070.bst b/test/testfile/complex_directory/y/2/00070.bst new file mode 100644 index 00000000000..49004aa2327 --- /dev/null +++ b/test/testfile/complex_directory/y/2/00070.bst @@ -0,0 +1,2 @@ +GO;5Z`;b~SIQOj,7XȀ!PAx9TQaF-y #_`kp:r,H2D' ^MnûpCG%8!o2PIQX +[ϧ.} u #>c~3+VU yYӍ8+%pE \AifLk)o4/emWr,9{QQY":,}HU}#< \ No newline at end of file diff --git a/test/testfile/complex_directory/y/2/00077.binary b/test/testfile/complex_directory/y/2/00077.binary new file mode 100644 index 00000000000..3a1704c3099 Binary files /dev/null and b/test/testfile/complex_directory/y/2/00077.binary differ diff --git a/test/testfile/complex_directory/y/2/00083.bst b/test/testfile/complex_directory/y/2/00083.bst new file mode 100644 index 00000000000..a372312081c Binary files /dev/null and b/test/testfile/complex_directory/y/2/00083.bst differ diff --git a/test/testfile/complex_directory_bin/00005.bin b/test/testfile/complex_directory_bin/00005.bin new file mode 100644 index 00000000000..5f37b6ea934 Binary files /dev/null and b/test/testfile/complex_directory_bin/00005.bin differ diff --git a/test/testfile/complex_directory_bin/00011.bin b/test/testfile/complex_directory_bin/00011.bin new file mode 100644 index 00000000000..77b58b8004c Binary files /dev/null and b/test/testfile/complex_directory_bin/00011.bin differ diff --git a/test/testfile/complex_directory_bin/00012.bin b/test/testfile/complex_directory_bin/00012.bin new file mode 100644 index 00000000000..d9116eb8cba Binary files /dev/null and b/test/testfile/complex_directory_bin/00012.bin differ diff --git a/test/testfile/complex_directory_bin/00014.bin b/test/testfile/complex_directory_bin/00014.bin new file mode 100644 index 00000000000..57c13c2173a Binary files /dev/null and b/test/testfile/complex_directory_bin/00014.bin differ diff --git a/test/testfile/complex_directory_bin/00018.bin b/test/testfile/complex_directory_bin/00018.bin new file mode 100644 index 00000000000..416b205460e Binary files /dev/null and b/test/testfile/complex_directory_bin/00018.bin differ diff --git a/test/testfile/complex_directory_bin/00025.bin b/test/testfile/complex_directory_bin/00025.bin new file mode 100644 index 00000000000..ccb6987af51 Binary files /dev/null and b/test/testfile/complex_directory_bin/00025.bin differ diff --git a/test/testfile/complex_directory_bin/00026.bin b/test/testfile/complex_directory_bin/00026.bin new file mode 100644 index 00000000000..da18682af30 Binary files /dev/null and b/test/testfile/complex_directory_bin/00026.bin differ diff --git a/test/testfile/complex_directory_bin/00027.bin b/test/testfile/complex_directory_bin/00027.bin new file mode 100644 index 00000000000..e0f13bb7cb8 Binary files /dev/null and b/test/testfile/complex_directory_bin/00027.bin differ diff --git a/test/testfile/complex_directory_bin/00028.bin b/test/testfile/complex_directory_bin/00028.bin new file mode 100644 index 00000000000..850cb34cb24 Binary files /dev/null and b/test/testfile/complex_directory_bin/00028.bin differ diff --git a/test/testfile/complex_directory_bin/00034.bin b/test/testfile/complex_directory_bin/00034.bin new file mode 100644 index 00000000000..31d33c3d171 Binary files /dev/null and b/test/testfile/complex_directory_bin/00034.bin differ diff --git a/test/testfile/complex_directory_bin/00036.bin b/test/testfile/complex_directory_bin/00036.bin new file mode 100644 index 00000000000..8408e5c434b Binary files /dev/null and b/test/testfile/complex_directory_bin/00036.bin differ diff --git a/test/testfile/complex_directory_bin/00039.bin b/test/testfile/complex_directory_bin/00039.bin new file mode 100644 index 00000000000..b70d1746d2c Binary files /dev/null and b/test/testfile/complex_directory_bin/00039.bin differ diff --git a/test/testfile/complex_directory_bin/00045.bin b/test/testfile/complex_directory_bin/00045.bin new file mode 100644 index 00000000000..9f9c9b9b788 Binary files /dev/null and b/test/testfile/complex_directory_bin/00045.bin differ diff --git a/test/testfile/complex_directory_bin/00050.bin b/test/testfile/complex_directory_bin/00050.bin new file mode 100644 index 00000000000..4d937fce3c1 Binary files /dev/null and b/test/testfile/complex_directory_bin/00050.bin differ diff --git a/test/testfile/complex_directory_bin/00051.bin b/test/testfile/complex_directory_bin/00051.bin new file mode 100644 index 00000000000..0ab3a17a696 Binary files /dev/null and b/test/testfile/complex_directory_bin/00051.bin differ diff --git a/test/testfile/complex_directory_bin/00054.bin b/test/testfile/complex_directory_bin/00054.bin new file mode 100644 index 00000000000..e1fd75041f5 Binary files /dev/null and b/test/testfile/complex_directory_bin/00054.bin differ diff --git a/test/testfile/complex_directory_bin/00056.bin b/test/testfile/complex_directory_bin/00056.bin new file mode 100644 index 00000000000..66c795e2fc2 Binary files /dev/null and b/test/testfile/complex_directory_bin/00056.bin differ diff --git a/test/testfile/complex_directory_bin/00058.bin b/test/testfile/complex_directory_bin/00058.bin new file mode 100644 index 00000000000..f6d0e3661e3 Binary files /dev/null and b/test/testfile/complex_directory_bin/00058.bin differ diff --git a/test/testfile/complex_directory_bin/00067.bin b/test/testfile/complex_directory_bin/00067.bin new file mode 100644 index 00000000000..cdb8a914ae7 Binary files /dev/null and b/test/testfile/complex_directory_bin/00067.bin differ diff --git a/test/testfile/complex_directory_bin/00071.bin b/test/testfile/complex_directory_bin/00071.bin new file mode 100644 index 00000000000..eb92b18b6e5 Binary files /dev/null and b/test/testfile/complex_directory_bin/00071.bin differ diff --git a/test/testfile/complex_directory_bin/00072.bin b/test/testfile/complex_directory_bin/00072.bin new file mode 100644 index 00000000000..379650c5848 Binary files /dev/null and b/test/testfile/complex_directory_bin/00072.bin differ diff --git a/test/testfile/complex_directory_bin/00075.bin b/test/testfile/complex_directory_bin/00075.bin new file mode 100644 index 00000000000..e5a5c4518ed Binary files /dev/null and b/test/testfile/complex_directory_bin/00075.bin differ diff --git a/test/testfile/complex_directory_bin/00082.bin b/test/testfile/complex_directory_bin/00082.bin new file mode 100644 index 00000000000..64fc1288ab5 Binary files /dev/null and b/test/testfile/complex_directory_bin/00082.bin differ diff --git a/test/testfile/complex_directory_bin/00085.bin b/test/testfile/complex_directory_bin/00085.bin new file mode 100644 index 00000000000..1587b7f1b6e Binary files /dev/null and b/test/testfile/complex_directory_bin/00085.bin differ diff --git a/test/testfile/complex_directory_bin/00091.bin b/test/testfile/complex_directory_bin/00091.bin new file mode 100644 index 00000000000..2748eb60618 Binary files /dev/null and b/test/testfile/complex_directory_bin/00091.bin differ diff --git a/test/testfile/complex_directory_bin/00093.bin b/test/testfile/complex_directory_bin/00093.bin new file mode 100644 index 00000000000..ca1fc094716 Binary files /dev/null and b/test/testfile/complex_directory_bin/00093.bin differ diff --git a/test/testfile/complex_directory_bin/00095.bin b/test/testfile/complex_directory_bin/00095.bin new file mode 100644 index 00000000000..6a0451c845b Binary files /dev/null and b/test/testfile/complex_directory_bin/00095.bin differ diff --git a/test/testfile/complex_directory_bin/00098.bin b/test/testfile/complex_directory_bin/00098.bin new file mode 100644 index 00000000000..de0f71920b3 Binary files /dev/null and b/test/testfile/complex_directory_bin/00098.bin differ diff --git a/test/testfile/complex_directory_binary/00000.binary b/test/testfile/complex_directory_binary/00000.binary new file mode 100644 index 00000000000..18f9e119f90 Binary files /dev/null and b/test/testfile/complex_directory_binary/00000.binary differ diff --git a/test/testfile/complex_directory_binary/00001.binary b/test/testfile/complex_directory_binary/00001.binary new file mode 100644 index 00000000000..b272bfa2a27 Binary files /dev/null and b/test/testfile/complex_directory_binary/00001.binary differ diff --git a/test/testfile/complex_directory_binary/00004.binary b/test/testfile/complex_directory_binary/00004.binary new file mode 100644 index 00000000000..e396bf63c33 Binary files /dev/null and b/test/testfile/complex_directory_binary/00004.binary differ diff --git a/test/testfile/complex_directory_binary/00007.binary b/test/testfile/complex_directory_binary/00007.binary new file mode 100644 index 00000000000..08c7fd6c727 Binary files /dev/null and b/test/testfile/complex_directory_binary/00007.binary differ diff --git a/test/testfile/complex_directory_binary/00008.binary b/test/testfile/complex_directory_binary/00008.binary new file mode 100644 index 00000000000..50b6f82927b Binary files /dev/null and b/test/testfile/complex_directory_binary/00008.binary differ diff --git a/test/testfile/complex_directory_binary/00016.binary b/test/testfile/complex_directory_binary/00016.binary new file mode 100644 index 00000000000..8c05d8b7e37 Binary files /dev/null and b/test/testfile/complex_directory_binary/00016.binary differ diff --git a/test/testfile/complex_directory_binary/00017.binary b/test/testfile/complex_directory_binary/00017.binary new file mode 100644 index 00000000000..f67c9d3045a Binary files /dev/null and b/test/testfile/complex_directory_binary/00017.binary differ diff --git a/test/testfile/complex_directory_binary/00021.binary b/test/testfile/complex_directory_binary/00021.binary new file mode 100644 index 00000000000..02a730a0650 Binary files /dev/null and b/test/testfile/complex_directory_binary/00021.binary differ diff --git a/test/testfile/complex_directory_binary/00024.binary b/test/testfile/complex_directory_binary/00024.binary new file mode 100644 index 00000000000..d871cd108ac Binary files /dev/null and b/test/testfile/complex_directory_binary/00024.binary differ diff --git a/test/testfile/complex_directory_binary/00033.binary b/test/testfile/complex_directory_binary/00033.binary new file mode 100644 index 00000000000..8d0aee67137 Binary files /dev/null and b/test/testfile/complex_directory_binary/00033.binary differ diff --git a/test/testfile/complex_directory_binary/00041.binary b/test/testfile/complex_directory_binary/00041.binary new file mode 100644 index 00000000000..82f703a2143 Binary files /dev/null and b/test/testfile/complex_directory_binary/00041.binary differ diff --git a/test/testfile/complex_directory_binary/00043.binary b/test/testfile/complex_directory_binary/00043.binary new file mode 100644 index 00000000000..1c5a5663a0e Binary files /dev/null and b/test/testfile/complex_directory_binary/00043.binary differ diff --git a/test/testfile/complex_directory_binary/00047.binary b/test/testfile/complex_directory_binary/00047.binary new file mode 100644 index 00000000000..2394fbf28da Binary files /dev/null and b/test/testfile/complex_directory_binary/00047.binary differ diff --git a/test/testfile/complex_directory_binary/00049.binary b/test/testfile/complex_directory_binary/00049.binary new file mode 100644 index 00000000000..f79db0d0858 Binary files /dev/null and b/test/testfile/complex_directory_binary/00049.binary differ diff --git a/test/testfile/complex_directory_binary/00052.binary b/test/testfile/complex_directory_binary/00052.binary new file mode 100644 index 00000000000..b338c8e3c29 Binary files /dev/null and b/test/testfile/complex_directory_binary/00052.binary differ diff --git a/test/testfile/complex_directory_binary/00053.binary b/test/testfile/complex_directory_binary/00053.binary new file mode 100644 index 00000000000..ae241c85001 Binary files /dev/null and b/test/testfile/complex_directory_binary/00053.binary differ diff --git a/test/testfile/complex_directory_binary/00055.binary b/test/testfile/complex_directory_binary/00055.binary new file mode 100644 index 00000000000..ba206e2f333 Binary files /dev/null and b/test/testfile/complex_directory_binary/00055.binary differ diff --git a/test/testfile/complex_directory_binary/00062.binary b/test/testfile/complex_directory_binary/00062.binary new file mode 100644 index 00000000000..6f72aea6d66 Binary files /dev/null and b/test/testfile/complex_directory_binary/00062.binary differ diff --git a/test/testfile/complex_directory_binary/00064.binary b/test/testfile/complex_directory_binary/00064.binary new file mode 100644 index 00000000000..b8766dfc8ec Binary files /dev/null and b/test/testfile/complex_directory_binary/00064.binary differ diff --git a/test/testfile/complex_directory_binary/00065.binary b/test/testfile/complex_directory_binary/00065.binary new file mode 100644 index 00000000000..b8f8de43c39 Binary files /dev/null and b/test/testfile/complex_directory_binary/00065.binary differ diff --git a/test/testfile/complex_directory_binary/00066.binary b/test/testfile/complex_directory_binary/00066.binary new file mode 100644 index 00000000000..3453412070a Binary files /dev/null and b/test/testfile/complex_directory_binary/00066.binary differ diff --git a/test/testfile/complex_directory_binary/00073.binary b/test/testfile/complex_directory_binary/00073.binary new file mode 100644 index 00000000000..75286342f72 Binary files /dev/null and b/test/testfile/complex_directory_binary/00073.binary differ diff --git a/test/testfile/complex_directory_binary/00076.binary b/test/testfile/complex_directory_binary/00076.binary new file mode 100644 index 00000000000..d5773de6449 Binary files /dev/null and b/test/testfile/complex_directory_binary/00076.binary differ diff --git a/test/testfile/complex_directory_binary/00077.binary b/test/testfile/complex_directory_binary/00077.binary new file mode 100644 index 00000000000..3a1704c3099 Binary files /dev/null and b/test/testfile/complex_directory_binary/00077.binary differ diff --git a/test/testfile/complex_directory_binary/00086.binary b/test/testfile/complex_directory_binary/00086.binary new file mode 100644 index 00000000000..75012eb3376 Binary files /dev/null and b/test/testfile/complex_directory_binary/00086.binary differ diff --git a/test/testfile/complex_directory_binary/00088.binary b/test/testfile/complex_directory_binary/00088.binary new file mode 100644 index 00000000000..80583fa7d6f Binary files /dev/null and b/test/testfile/complex_directory_binary/00088.binary differ diff --git a/test/testfile/complex_directory_binary/00089.binary b/test/testfile/complex_directory_binary/00089.binary new file mode 100644 index 00000000000..ad4697ecc1c Binary files /dev/null and b/test/testfile/complex_directory_binary/00089.binary differ diff --git a/test/testfile/complex_directory_binary/00090.binary b/test/testfile/complex_directory_binary/00090.binary new file mode 100644 index 00000000000..fa057c9391e Binary files /dev/null and b/test/testfile/complex_directory_binary/00090.binary differ diff --git a/test/testfile/complex_directory_binary/00092.binary b/test/testfile/complex_directory_binary/00092.binary new file mode 100644 index 00000000000..e39732e0bb4 Binary files /dev/null and b/test/testfile/complex_directory_binary/00092.binary differ diff --git a/test/testfile/complex_directory_binary/00094.binary b/test/testfile/complex_directory_binary/00094.binary new file mode 100644 index 00000000000..2ce0b11336d Binary files /dev/null and b/test/testfile/complex_directory_binary/00094.binary differ diff --git a/test/testfile/complex_directory_binary/00099.binary b/test/testfile/complex_directory_binary/00099.binary new file mode 100644 index 00000000000..4560a6523ed Binary files /dev/null and b/test/testfile/complex_directory_binary/00099.binary differ diff --git a/test/testfile/complex_directory_bst/00002.bst b/test/testfile/complex_directory_bst/00002.bst new file mode 100644 index 00000000000..3fa894c7d04 Binary files /dev/null and b/test/testfile/complex_directory_bst/00002.bst differ diff --git a/test/testfile/complex_directory_bst/00003.bst b/test/testfile/complex_directory_bst/00003.bst new file mode 100644 index 00000000000..f8cb15f7717 --- /dev/null +++ b/test/testfile/complex_directory_bst/00003.bst @@ -0,0 +1 @@ +zC]#=W:'u^Ա*j 7W<.A[PLVn \ No newline at end of file diff --git a/test/testfile/complex_directory_bst/00006.bst b/test/testfile/complex_directory_bst/00006.bst new file mode 100644 index 00000000000..3c01ba96af5 Binary files /dev/null and b/test/testfile/complex_directory_bst/00006.bst differ diff --git a/test/testfile/complex_directory_bst/00009.bst b/test/testfile/complex_directory_bst/00009.bst new file mode 100644 index 00000000000..48c96f94855 Binary files /dev/null and b/test/testfile/complex_directory_bst/00009.bst differ diff --git a/test/testfile/complex_directory_bst/00010.bst b/test/testfile/complex_directory_bst/00010.bst new file mode 100644 index 00000000000..361667fc124 Binary files /dev/null and b/test/testfile/complex_directory_bst/00010.bst differ diff --git a/test/testfile/complex_directory_bst/00013.bst b/test/testfile/complex_directory_bst/00013.bst new file mode 100644 index 00000000000..d0ac3ef7785 Binary files /dev/null and b/test/testfile/complex_directory_bst/00013.bst differ diff --git a/test/testfile/complex_directory_bst/00015.bst b/test/testfile/complex_directory_bst/00015.bst new file mode 100644 index 00000000000..cbd7ecf386f Binary files /dev/null and b/test/testfile/complex_directory_bst/00015.bst differ diff --git a/test/testfile/complex_directory_bst/00019.bst b/test/testfile/complex_directory_bst/00019.bst new file mode 100644 index 00000000000..299d105e0c9 Binary files /dev/null and b/test/testfile/complex_directory_bst/00019.bst differ diff --git a/test/testfile/complex_directory_bst/00020.bst b/test/testfile/complex_directory_bst/00020.bst new file mode 100644 index 00000000000..ab62ef5d937 Binary files /dev/null and b/test/testfile/complex_directory_bst/00020.bst differ diff --git a/test/testfile/complex_directory_bst/00022.bst b/test/testfile/complex_directory_bst/00022.bst new file mode 100644 index 00000000000..04ac26d4064 Binary files /dev/null and b/test/testfile/complex_directory_bst/00022.bst differ diff --git a/test/testfile/complex_directory_bst/00023.bst b/test/testfile/complex_directory_bst/00023.bst new file mode 100644 index 00000000000..30f0d056521 Binary files /dev/null and b/test/testfile/complex_directory_bst/00023.bst differ diff --git a/test/testfile/complex_directory_bst/00029.bst b/test/testfile/complex_directory_bst/00029.bst new file mode 100644 index 00000000000..1d81e68e4d7 Binary files /dev/null and b/test/testfile/complex_directory_bst/00029.bst differ diff --git a/test/testfile/complex_directory_bst/00030.bst b/test/testfile/complex_directory_bst/00030.bst new file mode 100644 index 00000000000..ccbe3db9c99 Binary files /dev/null and b/test/testfile/complex_directory_bst/00030.bst differ diff --git a/test/testfile/complex_directory_bst/00031.bst b/test/testfile/complex_directory_bst/00031.bst new file mode 100644 index 00000000000..5b7abd0bee8 Binary files /dev/null and b/test/testfile/complex_directory_bst/00031.bst differ diff --git a/test/testfile/complex_directory_bst/00032.bst b/test/testfile/complex_directory_bst/00032.bst new file mode 100644 index 00000000000..8dde9024d0d Binary files /dev/null and b/test/testfile/complex_directory_bst/00032.bst differ diff --git a/test/testfile/complex_directory_bst/00035.bst b/test/testfile/complex_directory_bst/00035.bst new file mode 100644 index 00000000000..96af4289d08 Binary files /dev/null and b/test/testfile/complex_directory_bst/00035.bst differ diff --git a/test/testfile/complex_directory_bst/00037.bst b/test/testfile/complex_directory_bst/00037.bst new file mode 100644 index 00000000000..2c2a19e3bf6 Binary files /dev/null and b/test/testfile/complex_directory_bst/00037.bst differ diff --git a/test/testfile/complex_directory_bst/00038.bst b/test/testfile/complex_directory_bst/00038.bst new file mode 100644 index 00000000000..89d63bce487 Binary files /dev/null and b/test/testfile/complex_directory_bst/00038.bst differ diff --git a/test/testfile/complex_directory_bst/00040.bst b/test/testfile/complex_directory_bst/00040.bst new file mode 100644 index 00000000000..af89367c82e Binary files /dev/null and b/test/testfile/complex_directory_bst/00040.bst differ diff --git a/test/testfile/complex_directory_bst/00042.bst b/test/testfile/complex_directory_bst/00042.bst new file mode 100644 index 00000000000..31993df0b49 Binary files /dev/null and b/test/testfile/complex_directory_bst/00042.bst differ diff --git a/test/testfile/complex_directory_bst/00044.bst b/test/testfile/complex_directory_bst/00044.bst new file mode 100644 index 00000000000..6342a4d3082 Binary files /dev/null and b/test/testfile/complex_directory_bst/00044.bst differ diff --git a/test/testfile/complex_directory_bst/00046.bst b/test/testfile/complex_directory_bst/00046.bst new file mode 100644 index 00000000000..43d2b229b6f Binary files /dev/null and b/test/testfile/complex_directory_bst/00046.bst differ diff --git a/test/testfile/complex_directory_bst/00048.bst b/test/testfile/complex_directory_bst/00048.bst new file mode 100644 index 00000000000..645918b4849 Binary files /dev/null and b/test/testfile/complex_directory_bst/00048.bst differ diff --git a/test/testfile/complex_directory_bst/00057.bst b/test/testfile/complex_directory_bst/00057.bst new file mode 100644 index 00000000000..1ad4661fb75 Binary files /dev/null and b/test/testfile/complex_directory_bst/00057.bst differ diff --git a/test/testfile/complex_directory_bst/00059.bst b/test/testfile/complex_directory_bst/00059.bst new file mode 100644 index 00000000000..14d1389ad4e Binary files /dev/null and b/test/testfile/complex_directory_bst/00059.bst differ diff --git a/test/testfile/complex_directory_bst/00060.bst b/test/testfile/complex_directory_bst/00060.bst new file mode 100644 index 00000000000..7e26f016632 Binary files /dev/null and b/test/testfile/complex_directory_bst/00060.bst differ diff --git a/test/testfile/complex_directory_bst/00061.bst b/test/testfile/complex_directory_bst/00061.bst new file mode 100644 index 00000000000..635523fbb13 Binary files /dev/null and b/test/testfile/complex_directory_bst/00061.bst differ diff --git a/test/testfile/complex_directory_bst/00063.bst b/test/testfile/complex_directory_bst/00063.bst new file mode 100644 index 00000000000..325f9552929 Binary files /dev/null and b/test/testfile/complex_directory_bst/00063.bst differ diff --git a/test/testfile/complex_directory_bst/00068.bst b/test/testfile/complex_directory_bst/00068.bst new file mode 100644 index 00000000000..edb97c753ff Binary files /dev/null and b/test/testfile/complex_directory_bst/00068.bst differ diff --git a/test/testfile/complex_directory_bst/00069.bst b/test/testfile/complex_directory_bst/00069.bst new file mode 100644 index 00000000000..d6c7562b6f9 Binary files /dev/null and b/test/testfile/complex_directory_bst/00069.bst differ diff --git a/test/testfile/complex_directory_bst/00070.bst b/test/testfile/complex_directory_bst/00070.bst new file mode 100644 index 00000000000..49004aa2327 --- /dev/null +++ b/test/testfile/complex_directory_bst/00070.bst @@ -0,0 +1,2 @@ +GO;5Z`;b~SIQOj,7XȀ!PAx9TQaF-y #_`kp:r,H2D' ^MnûpCG%8!o2PIQX +[ϧ.} u #>c~3+VU yYӍ8+%pE \AifLk)o4/emWr,9{QQY":,}HU}#< \ No newline at end of file diff --git a/test/testfile/complex_directory_bst/00074.bst b/test/testfile/complex_directory_bst/00074.bst new file mode 100644 index 00000000000..3d2fe3d916e Binary files /dev/null and b/test/testfile/complex_directory_bst/00074.bst differ diff --git a/test/testfile/complex_directory_bst/00078.bst b/test/testfile/complex_directory_bst/00078.bst new file mode 100644 index 00000000000..3989862ee01 Binary files /dev/null and b/test/testfile/complex_directory_bst/00078.bst differ diff --git a/test/testfile/complex_directory_bst/00079.bst b/test/testfile/complex_directory_bst/00079.bst new file mode 100644 index 00000000000..9e4ccb282b3 Binary files /dev/null and b/test/testfile/complex_directory_bst/00079.bst differ diff --git a/test/testfile/complex_directory_bst/00080.bst b/test/testfile/complex_directory_bst/00080.bst new file mode 100644 index 00000000000..2de8f3968af Binary files /dev/null and b/test/testfile/complex_directory_bst/00080.bst differ diff --git a/test/testfile/complex_directory_bst/00081.bst b/test/testfile/complex_directory_bst/00081.bst new file mode 100644 index 00000000000..6919af4574b Binary files /dev/null and b/test/testfile/complex_directory_bst/00081.bst differ diff --git a/test/testfile/complex_directory_bst/00083.bst b/test/testfile/complex_directory_bst/00083.bst new file mode 100644 index 00000000000..a372312081c Binary files /dev/null and b/test/testfile/complex_directory_bst/00083.bst differ diff --git a/test/testfile/complex_directory_bst/00084.bst b/test/testfile/complex_directory_bst/00084.bst new file mode 100644 index 00000000000..3e0138be577 Binary files /dev/null and b/test/testfile/complex_directory_bst/00084.bst differ diff --git a/test/testfile/complex_directory_bst/00087.bst b/test/testfile/complex_directory_bst/00087.bst new file mode 100644 index 00000000000..d36551922fb Binary files /dev/null and b/test/testfile/complex_directory_bst/00087.bst differ diff --git a/test/testfile/complex_directory_bst/00096.bst b/test/testfile/complex_directory_bst/00096.bst new file mode 100644 index 00000000000..e1e70d687c3 Binary files /dev/null and b/test/testfile/complex_directory_bst/00096.bst differ diff --git a/test/testfile/complex_directory_bst/00097.bst b/test/testfile/complex_directory_bst/00097.bst new file mode 100644 index 00000000000..ba322574ed3 Binary files /dev/null and b/test/testfile/complex_directory_bst/00097.bst differ