Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8)

Side by Side Diff: Doc/library/shutil.rst

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/shlex.rst ('k') | Doc/library/signal.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 :mod:`shutil` --- High-level file operations 1 :mod:`shutil` --- High-level file operations
2 ============================================ 2 ============================================
3 3
4 .. module:: shutil 4 .. module:: shutil
5 :synopsis: High-level file operations, including copying. 5 :synopsis: High-level file operations, including copying.
6 .. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org> 6 .. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
7 .. partly based on the docstrings 7 .. partly based on the docstrings
8 8
9 .. index:: 9 .. index::
10 single: file; copying 10 single: file; copying
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 :func:`os.rmdir`. The second parameter, *path*, will be the path name passed 154 :func:`os.rmdir`. The second parameter, *path*, will be the path name passed
155 to *function*. The third parameter, *excinfo*, will be the exception 155 to *function*. The third parameter, *excinfo*, will be the exception
156 information return by :func:`sys.exc_info`. Exceptions raised by *onerror* 156 information return by :func:`sys.exc_info`. Exceptions raised by *onerror*
157 will not be caught. 157 will not be caught.
158 158
159 159
160 .. function:: move(src, dst) 160 .. function:: move(src, dst)
161 161
162 Recursively move a file or directory to another location. 162 Recursively move a file or directory to another location.
163 163
164 Uses :func:`os.rename` to perform the move. If it fails, for reasons such as 164 If the destination is on the current filesystem, then simply use rename.
165 when *src* and *dst* are on different filesystems or in case of windows where 165 Otherwise, copy src (with :func:`copy2`) to the dst and then remove src.
166 rename is not supported when *dst* exists, fallback to copying *src* (with
167 :func:`copy2`) to the *dst* and then remove *src*.
168 166
169 .. function:: disk_usage(path)
170
171 Return disk usage statistics about the given path as a namedtuple including
172 total, used and free space expressed in bytes.
173
174 .. versionadded:: 3.3
175
176 Availability: Unix, Windows.
177 167
178 .. exception:: Error 168 .. exception:: Error
179 169
180 This exception collects exceptions that raised during a multi-file operation. For 170 This exception collects exceptions that raised during a multi-file operation. For
181 :func:`copytree`, the exception argument is a list of 3-tuples (*srcname*, 171 :func:`copytree`, the exception argument is a list of 3-tuples (*srcname*,
182 *dstname*, *exception*). 172 *dstname*, *exception*).
183 173
184 174
185 .. _shutil-example: 175 .. _shutil-example:
186 176
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 drwx------ tarek/staff 0 2010-02-01 16:23:40 ./ 385 drwx------ tarek/staff 0 2010-02-01 16:23:40 ./
396 -rw-r--r-- tarek/staff 609 2008-06-09 13:26:54 ./authorized_keys 386 -rw-r--r-- tarek/staff 609 2008-06-09 13:26:54 ./authorized_keys
397 -rwxr-xr-x tarek/staff 65 2008-06-09 13:26:54 ./config 387 -rwxr-xr-x tarek/staff 65 2008-06-09 13:26:54 ./config
398 -rwx------ tarek/staff 668 2008-06-09 13:26:54 ./id_dsa 388 -rwx------ tarek/staff 668 2008-06-09 13:26:54 ./id_dsa
399 -rwxr-xr-x tarek/staff 609 2008-06-09 13:26:54 ./id_dsa.pub 389 -rwxr-xr-x tarek/staff 609 2008-06-09 13:26:54 ./id_dsa.pub
400 -rw------- tarek/staff 1675 2008-06-09 13:26:54 ./id_rsa 390 -rw------- tarek/staff 1675 2008-06-09 13:26:54 ./id_rsa
401 -rw-r--r-- tarek/staff 397 2008-06-09 13:26:54 ./id_rsa.pub 391 -rw-r--r-- tarek/staff 397 2008-06-09 13:26:54 ./id_rsa.pub
402 -rw-r--r-- tarek/staff 37192 2010-02-06 18:23:10 ./known_hosts 392 -rw-r--r-- tarek/staff 37192 2010-02-06 18:23:10 ./known_hosts
403 393
404 394
OLDNEW
« no previous file with comments | « Doc/library/shlex.rst ('k') | Doc/library/signal.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+