io¶
General I/O functions.
- class deltona.io.RARInfo(attributes_str: str, date: datetime, name: str, size: int)¶
Bases:
objectFile within a RAR information.
- exception deltona.io.SFVVerificationError(filename: StrPath, expected_crc: int, actual_crc: int)¶
Bases:
ExceptionRaised when SFV fails verification.
-
class deltona.io.UnRAR(unrar_path: StrPath =
'unrar')¶ Bases:
objectSimple front-end to an
unrarcommand.- pipe(rar: StrPath, inner_filename: str) Iterator[sp.Popen[bytes]]¶
Start of the pipe of the RAR’s content.
- exception deltona.io.UnRARExtractionTestFailed¶
Bases:
UnRARErrorRaised when testing extraction fails.
-
deltona.io.context_os_open(path: StrPath, flags: int, mode: int =
511, *, dir_fd: int | None =None) Iterator[int]¶ Context-managed file descriptor opener.
- deltona.io.extract_gog(filename: StrPath, output_dir: StrPath) None¶
Extract a Linux gog.com archive.
- deltona.io.extract_rar_from_zip(zip_file: ZipFile) Iterator[str]¶
Extract RAR files from a zip file.
-
deltona.io.make_sfv(sfv_file: StrPath, files: Iterable[StrPath], *, header: bool =
True) None¶ Create an SFV file.
-
deltona.io.unpack_0day(path: StrPath, *, remove_diz: bool =
True) None¶ Unpack RAR files from 0day zip file sets.
- deltona.io.unpack_ebook(path: StrPath) None¶
Unpack a specially packed eBook file.
- Parameters:¶
- Raises:¶
ValueError – If no RAR, PDF, or ePub files are found, or if multiple are found unexpectedly.
NotADirectoryError – If
pathis not a directory.FileExistsError – If no zip files are found.