--- /dev/null
+# Stubs for pathlib (Python 3.4)\r
+\r
+from typing import Any, Generator, IO, Optional, Sequence, Tuple, Type, TypeVar, Union, List\r
+from types import TracebackType\r
+import os\r
+import sys\r
+\r
+_P = TypeVar('_P', bound='PurePath')\r
+\r
+if sys.version_info >= (3, 6):\r
+ _PurePathBase = os.PathLike[str]\r
+else:\r
+ _PurePathBase = object\r
+\r
+class PurePath(_PurePathBase):\r
+ parts = ... # type: Tuple[str, ...]\r
+ drive = ... # type: str\r
+ root = ... # type: str\r
+ anchor = ... # type: str\r
+ name = ... # type: str\r
+ suffix = ... # type: str\r
+ suffixes = ... # type: List[str]\r
+ stem = ... # type: str\r
+ if sys.version_info < (3, 5):\r
+ def __init__(self, *pathsegments: str) -> None: ...\r
+ elif sys.version_info < (3, 6):\r
+ def __new__(cls: Type[_P], *args: Union[str, PurePath]) -> _P: ...\r
+ else:\r
+ def __new__(cls: Type[_P], *args: Union[str, os.PathLike[str]]) -> _P: ...\r
+ def __hash__(self) -> int: ...\r
+ def __lt__(self, other: PurePath) -> bool: ...\r
+ def __le__(self, other: PurePath) -> bool: ...\r
+ def __gt__(self, other: PurePath) -> bool: ...\r
+ def __ge__(self, other: PurePath) -> bool: ...\r
+ def __truediv__(self: _P, key: Union[str, PurePath]) -> _P: ...\r
+ def __bytes__(self) -> bytes: ...\r
+ def as_posix(self) -> str: ...\r
+ def as_uri(self) -> str: ...\r
+ def is_absolute(self) -> bool: ...\r
+ def is_reserved(self) -> bool: ...\r
+ def match(self, path_pattern: str) -> bool: ...\r
+ def relative_to(self: _P, *other: Union[str, PurePath]) -> _P: ...\r
+ def with_name(self: _P, name: str) -> _P: ...\r
+ def with_suffix(self: _P, suffix: str) -> _P: ...\r
+ def joinpath(self: _P, *other: Union[str, PurePath]) -> _P: ...\r
+\r
+ @property\r
+ def parents(self: _P) -> Sequence[_P]: ...\r
+ @property\r
+ def parent(self: _P) -> _P: ...\r
+\r
+class PurePosixPath(PurePath): ...\r
+class PureWindowsPath(PurePath): ...\r
+\r
+class Path(PurePath):\r
+ def __enter__(self) -> Path: ...\r
+ def __exit__(self, exc_type: Optional[Type[BaseException]],\r
+ exc_value: Optional[BaseException],\r
+ traceback: Optional[TracebackType]) -> Optional[bool]: ...\r
+ @classmethod\r
+ def cwd(cls: Type[_P]) -> _P: ...\r
+ def stat(self) -> os.stat_result: ...\r
+ def chmod(self, mode: int) -> None: ...\r
+ def exists(self) -> bool: ...\r
+ def glob(self, pattern: str) -> Generator[Path, None, None]: ...\r
+ def group(self) -> str: ...\r
+ def is_dir(self) -> bool: ...\r
+ def is_file(self) -> bool: ...\r
+ def is_symlink(self) -> bool: ...\r
+ def is_socket(self) -> bool: ...\r
+ def is_fifo(self) -> bool: ...\r
+ def is_block_device(self) -> bool: ...\r
+ def is_char_device(self) -> bool: ...\r
+ def iterdir(self) -> Generator[Path, None, None]: ...\r
+ def lchmod(self, mode: int) -> None: ...\r
+ def lstat(self) -> os.stat_result: ...\r
+ if sys.version_info < (3, 5):\r
+ def mkdir(self, mode: int = ...,\r
+ parents: bool = ...) -> None: ...\r
+ else:\r
+ def mkdir(self, mode: int = ..., parents: bool = ...,\r
+ exist_ok: bool = ...) -> None: ...\r
+ def open(self, mode: str = ..., buffering: int = ...,\r
+ encoding: Optional[str] = ..., errors: Optional[str] = ...,\r
+ newline: Optional[str] = ...) -> IO[Any]: ...\r
+ def owner(self) -> str: ...\r
+ def rename(self, target: Union[str, PurePath]) -> None: ...\r
+ def replace(self, target: Union[str, PurePath]) -> None: ...\r
+ if sys.version_info < (3, 6):\r
+ def resolve(self: _P) -> _P: ...\r
+ else:\r
+ def resolve(self: _P, strict: bool = ...) -> _P: ...\r
+ def rglob(self, pattern: str) -> Generator[Path, None, None]: ...\r
+ def rmdir(self) -> None: ...\r
+ def symlink_to(self, target: Union[str, Path],\r
+ target_is_directory: bool = ...) -> None: ...\r
+ def touch(self, mode: int = ..., exist_ok: bool = ...) -> None: ...\r
+ def unlink(self) -> None: ...\r
+\r
+ if sys.version_info >= (3, 5):\r
+ @classmethod\r
+ def home(cls: Type[_P]) -> _P: ...\r
+ if sys.version_info < (3, 6):\r
+ def __new__(cls: Type[_P], *args: Union[str, PurePath],\r
+ **kwargs: Any) -> _P: ...\r
+ else:\r
+ def __new__(cls: Type[_P], *args: Union[str, os.PathLike[str]],\r
+ **kwargs: Any) -> _P: ...\r
+\r
+ def absolute(self: _P) -> _P: ...\r
+ def expanduser(self: _P) -> _P: ...\r
+ def read_bytes(self) -> bytes: ...\r
+ def read_text(self, encoding: Optional[str] = ...,\r
+ errors: Optional[str] = ...) -> str: ...\r
+ def samefile(self, other_path: Union[str, bytes, int, Path]) -> bool: ...\r
+ def write_bytes(self, data: bytes) -> int: ...\r
+ def write_text(self, data: str, encoding: Optional[str] = ...,\r
+ errors: Optional[str] = ...) -> int: ...\r
+\r
+\r
+class PosixPath(Path, PurePosixPath): ...\r
+class WindowsPath(Path, PureWindowsPath): ...\r