Files
django-stubs/django/utils/archive.pyi
2018-07-29 18:27:46 +03:00

38 lines
1.0 KiB
Python

from typing import (
List,
Tuple,
Type,
Union,
)
def extract(path: str, to_path: str = ...) -> None: ...
class Archive:
def __enter__(self) -> Archive: ...
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...
def __init__(self, file: str) -> None: ...
@staticmethod
def _archive_cls(file: str) -> Type[BaseArchive]: ...
def close(self) -> None: ...
def extract(self, to_path: str = ...) -> None: ...
class BaseArchive:
@staticmethod
def _copy_permissions(mode: int, filename: str) -> None: ...
def has_leading_dir(self, paths: List[str]) -> bool: ...
def split_leading_dir(self, path: str) -> Union[List[str], Tuple[str, str]]: ...
class TarArchive:
def __init__(self, file: str) -> None: ...
def close(self) -> None: ...
def extract(self, to_path: str) -> None: ...
class ZipArchive:
def __init__(self, file: str) -> None: ...
def close(self) -> None: ...
def extract(self, to_path: str) -> None: ...