Added os.sync, os.truncate and os.fwalk for Python version >= 3.3 (#293)

This commit is contained in:
thomascellerier
2016-06-15 18:53:26 +02:00
committed by Guido van Rossum
parent dee5e7a1df
commit f45c00f129

View File

@@ -5,7 +5,7 @@
from typing import (
Mapping, MutableMapping, Dict, List, Any, Tuple, Iterator, overload, Union, AnyStr,
Optional, Generic, Set
Optional, Generic, Set, Callable
)
import sys
from builtins import OSError as error
@@ -341,3 +341,13 @@ def waitid(idtype: int, id: int, options: int) -> waitresult: ...
P_ALL = 0
WEXITED = 0
WNOWAIT = 0
if sys.version_info >= (3, 3):
def sync() -> None: ... # Unix only
def truncate(path: Union[AnyStr, int], length: int) -> None: ... # Unix only up to version 3.4
def fwalk(top: AnyStr = ..., topdown: bool = ...,
onerror: Callable = ..., *, follow_symlinks: bool = ...,
dir_fd: int = ...) -> Iterator[Tuple[AnyStr, List[AnyStr],
List[AnyStr], int]]: ... # Unix only