oioioi.base.utils.archive
¶
Module Contents¶
Classes¶
The external API class that encapsulates an archive implementation. |
|
Base Archive class. Implementations should inherit this class. |
|
Base Archive class. Implementations should inherit this class. |
|
Base Archive class. Implementations should inherit this class. |
Functions¶
|
Unpack the tar or zip file at the specified path to the directory |
Attributes¶
- exception oioioi.base.utils.archive.ArchiveException[source]¶
Bases:
RuntimeError
Base exception class for all archive errors.
- exception oioioi.base.utils.archive.UnrecognizedArchiveFormat[source]¶
Bases:
ArchiveException
Error raised when passed file is not a recognized archive format.
- exception oioioi.base.utils.archive.UnsafeArchive[source]¶
Bases:
ArchiveException
Error raised when passed file contains paths that would be extracted outside of the target directory.
- oioioi.base.utils.archive.extract(path, to_path='', ext='', **kwargs)[source]¶
Unpack the tar or zip file at the specified path to the directory specified by to_path.
- class oioioi.base.utils.archive.Archive(file, ext='')[source]¶
Bases:
object
The external API class that encapsulates an archive implementation.
- class oioioi.base.utils.archive.BaseArchive[source]¶
Bases:
object
Base Archive class. Implementations should inherit this class.
- class oioioi.base.utils.archive.TarArchive(file)[source]¶
Bases:
BaseArchive
Base Archive class. Implementations should inherit this class.
- class oioioi.base.utils.archive.ZipArchive(file)[source]¶
Bases:
BaseArchive
Base Archive class. Implementations should inherit this class.