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

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

Issue 15238: shutil.copystat should copy Linux extended attributes
Patch Set: Created 6 years, 11 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 | « no previous file | Lib/shutil.py » ('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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 .. versionchanged:: 3.3 80 .. versionchanged:: 3.3
81 Added *symlinks* argument. 81 Added *symlinks* argument.
82 82
83 .. function:: copystat(src, dst, symlinks=False) 83 .. function:: copystat(src, dst, symlinks=False)
84 84
85 Copy the permission bits, last access time, last modification time, and flags 85 Copy the permission bits, last access time, last modification time, and flags
86 from *src* to *dst*. The file contents, owner, and group are unaffected. *s rc* 86 from *src* to *dst*. The file contents, owner, and group are unaffected. *s rc*
87 and *dst* are path names given as strings. If *src* and *dst* are both 87 and *dst* are path names given as strings. If *src* and *dst* are both
88 symbolic links and *symlinks* true, the stats of the link will be copied as 88 symbolic links and *symlinks* true, the stats of the link will be copied as
89 far as the platform allows. 89 far as the platform allows. On Linux, :func:`copystat` also copies the
90 "extended attributes" where possible.
90 91
91 .. versionchanged:: 3.3 92 .. versionchanged:: 3.3
92 Added *symlinks* argument. 93 Added *symlinks* argument and support for Linux extended attributes.
93 94
94 .. function:: copy(src, dst, symlinks=False) 95 .. function:: copy(src, dst, symlinks=False)
95 96
96 Copy the file *src* to the file or directory *dst* and return the file's 97 Copy the file *src* to the file or directory *dst* and return the file's
97 destination. If *dst* is a directory, a 98 destination. If *dst* is a directory, a
98 file with the same basename as *src* is created (or overwritten) in the 99 file with the same basename as *src* is created (or overwritten) in the
99 directory specified. Permission bits are copied. *src* and *dst* are path 100 directory specified. Permission bits are copied. *src* and *dst* are path
100 names given as strings. If *symlinks* is true, symbolic links won't be 101 names given as strings. If *symlinks* is true, symbolic links won't be
101 followed but recreated instead -- this resembles GNU's :program:`cp -P`. 102 followed but recreated instead -- this resembles GNU's :program:`cp -P`.
102 103
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 size used by many terminal emulators. 539 size used by many terminal emulators.
539 540
540 The value returned is a named tuple of type :class:`os.terminal_size`. 541 The value returned is a named tuple of type :class:`os.terminal_size`.
541 542
542 See also: The Single UNIX Specification, Version 2, 543 See also: The Single UNIX Specification, Version 2,
543 `Other Environment Variables`_. 544 `Other Environment Variables`_.
544 545
545 .. _`Other Environment Variables`: 546 .. _`Other Environment Variables`:
546 http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html#tag_002_003 547 http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html#tag_002_003
547 548
OLDNEW
« no previous file with comments | « no previous file | Lib/shutil.py » ('j') | no next file with comments »

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