forked from JetBrains/python-skeletons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shutil.py
99 lines (70 loc) · 2.25 KB
/
shutil.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
"""Skeleton for 'shutil' stdlib module."""
import sys
def copyfile(src, dst):
"""Copy the contents (no metadata) of the file named src to a file named
dst.
:type src: bytes | unicode
:type dst: bytes | unicode
:rtype: bytes | unicode
"""
pass
def copymode(src, dst):
"""Copy the permission bits from src to dst.
:type src: bytes | unicode
:type dst: bytes | unicode
:rtype: None
"""
pass
def copystat(src, dst):
"""Copy the permission bits, last access time, last modification time, and
flags from src to dst.
:type src: bytes | unicode
:type dst: bytes | unicode
:rtype: None
"""
pass
def copy(src, dst):
"""Copy the file src to the file or directory dst.
:type src: bytes | unicode
:type dst: bytes | unicode
:rtype: bytes | unicode
"""
pass
def copy2(src, dst):
"""Similar to shutil.copy(), but metadata is copied as well.
:type src: bytes | unicode
:type dst: bytes | unicode
:rtype: bytes | unicode
"""
pass
def ignore_patterns(*patterns):
"""This factory function creates a function that can be used as a callable
for copytree()'s ignore argument, ignoring files and directories that match
one of the glob-style patterns provided.
:type patterns: collections.Iterable[bytes | unicode]
:rtype: (bytes | unicode, list[bytes | unicode]) -> collections.Iterable[bytes | unicode]
"""
return lambda path, files: []
def copytree(src, dst, symlinks=False, ignore=None):
"""Recursively copy an entire directory tree rooted at src.
:type src: bytes | unicode
:type dst: bytes | unicode
:type symlinks: bool
:type ignore: ((bytes | unicode, list[bytes | unicode]) -> collections.Iterable[bytes | unicode]) | None
:rtype: bytes | unicode
"""
pass
def rmtree(path, ignore_errors=False, onerror=None):
"""Delete an entire directory tree.
:type path: bytes | unicode
:type ignore_errors: bool
:type onerror: (unknown, bytes | unicode, unknown) -> None
:rtype: None
"""
def move(src, dst):
"""Recursively move a file or directory (src) to another location (dst).
:type src: bytes | unicode
:type dst: bytes | unicode
:rtype: bytes | unicode
"""
pass