Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
7aa2c8ba
Kaydet (Commit)
7aa2c8ba
authored
Tem 15, 2012
tarafından
Larry Hastings
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #15202: Additional documentation fixes inadvertently omitted
from previous checkin.
üst
e554f8b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
41 deletions
+31
-41
shutil.rst
Doc/library/shutil.rst
+31
-41
No files found.
Doc/library/shutil.rst
Dosyayı görüntüle @
7aa2c8ba
...
@@ -59,68 +59,64 @@ Directory and files operations
...
@@ -59,68 +59,64 @@ Directory and files operations
such as character or block devices and pipes cannot be copied with this
such as character or block devices and pipes cannot be copied with this
function. *src* and *dst* are path names given as strings.
function. *src* and *dst* are path names given as strings.
If *symlinks* is true and *src* is a symbolic link, a new symbolic link will
If *follow_symlinks* is false and *src* is a symbolic link,
be created instead of copying the file *src* points to.
a new symbolic link will be created instead of copying the
file *src* points to.
.. versionchanged:: 3.3
.. versionchanged:: 3.3
:exc:`IOError` used to be raised instead of :exc:`OSError`.
:exc:`IOError` used to be raised instead of :exc:`OSError`.
Added *symlinks* argument.
Added *follow_symlinks* argument.
Now returns *dst*.
.. versionchanged:: 3.3
.. function:: copymode(src, dst, *, follow_symlinks=True)
Added return of the *dst*.
.. function:: copymode(src, dst, symlinks=False)
Copy the permission bits from *src* to *dst*. The file contents, owner, and
Copy the permission bits from *src* to *dst*. The file contents, owner, and
group are unaffected. *src* and *dst* are path names given as strings. If
group are unaffected. *src* and *dst* are path names given as strings. If
*
symlinks* is true, *src* a symbolic link and the operating system supports
*
follow_symlinks* is false, *src* is a symbolic link, and the operating
modes for symbolic links (for example BSD-based ones), the mode of the link
system supports modes for symbolic links (for example BSD-based ones),
will be copied.
the mode of the link
will be copied.
.. versionchanged:: 3.3
.. versionchanged:: 3.3
Added *symlinks* argument.
Added *
follow_
symlinks* argument.
.. function:: copystat(src, dst,
symlinks=Fals
e)
.. function:: copystat(src, dst,
*, follow_symlinks=Tru
e)
Copy the permission bits, last access time, last modification time, and flags
Copy the permission bits, last access time, last modification time, and flags
from *src* to *dst*. The file contents, owner, and group are unaffected. *src*
from *src* to *dst*. The file contents, owner, and group are unaffected. *src*
and *dst* are path names given as strings. If *
src* and *dst* are both
and *dst* are path names given as strings. If *
follow_symlinks* is false, and
symbolic links and *symlinks* true
, the stats of the link will be copied as
*src* and *dst* are both symbolic links
, the stats of the link will be copied as
far as the platform allows. On Linux, :func:`copystat` also copies the
far as the platform allows. On Linux, :func:`copystat` also copies the
"extended attributes" where possible.
"extended attributes" where possible.
.. versionchanged:: 3.3
.. versionchanged:: 3.3
Added *symlinks* argument and support for Linux extended attributes.
Added *
follow_
symlinks* argument and support for Linux extended attributes.
.. function:: copy(src, dst,
symlinks=Fals
e)
.. function:: copy(src, dst,
*, follow_symlinks=Tru
e)
Copy the file *src* to the file or directory *dst* and return the file's
Copy the file *src* to the file or directory *dst* and return the file's
destination. If *dst* is a directory, a
destination. If *dst* is a directory, a
file with the same basename as *src* is created (or overwritten) in the
file with the same basename as *src* is created (or overwritten) in the
directory specified. Permission bits are copied. *src* and *dst* are path
directory specified. Permission bits are copied. *src* and *dst* are path
names given as strings. If *symlinks* is true, symbolic links won't be
names given as strings. If *follow_symlinks* is false, symbolic
followed but recreated instead -- this resembles GNU's :program:`cp -P`.
links won't be followed but recreated instead -- this resembles GNU's
:program:`cp -P`.
.. versionchanged:: 3.3
.. versionchanged:: 3.3
Added *symlinks* argument.
Added *follow_symlinks* argument.
Now returns *dst*.
.. versionchanged:: 3.3
.. function:: copy2(src, dst, *, follow_symlinks=True)
Added return of the *dst*.
.. function:: copy2(src, dst, symlinks=False)
Similar to :func:`shutil.copy`, including that the destination is
Similar to :func:`shutil.copy`, including that the destination is
returned, but metadata is copied as well. This is
returned, but metadata is copied as well. This is
similar to the Unix
similar to the Unix command :program:`cp -p`. If *symlinks* is tru
e,
command :program:`cp -p`. If *follow_symlinks* is fals
e,
symbolic links won't be followed but recreated instead -- this resembles
symbolic links won't be followed but recreated instead -- this resembles
GNU's :program:`cp -P`.
GNU's :program:`cp -P`.
.. versionchanged:: 3.3
.. versionchanged:: 3.3
Added *symlinks* argument, try to copy extended file system attributes
Added *follow_symlinks* argument, try to copy extended
too (currently Linux only).
file system attributes too (currently Linux only).
Now returns *dst*.
.. versionchanged:: 3.3
Added return of the *dst*.
.. function:: ignore_patterns(\*patterns)
.. function:: ignore_patterns(\*patterns)
...
@@ -167,20 +163,16 @@ Directory and files operations
...
@@ -167,20 +163,16 @@ Directory and files operations
as arguments. By default, :func:`shutil.copy2` is used, but any function
as arguments. By default, :func:`shutil.copy2` is used, but any function
that supports the same signature (like :func:`shutil.copy`) can be used.
that supports the same signature (like :func:`shutil.copy`) can be used.
.. versionchanged:: 3.3
Copy metadata when *symlinks* is false.
Now returns *dst*.
.. versionchanged:: 3.2
.. versionchanged:: 3.2
Added the *copy_function* argument to be able to provide a custom copy
Added the *copy_function* argument to be able to provide a custom copy
function.
function.
.. versionchanged:: 3.2
Added the *ignore_dangling_symlinks* argument to silent dangling symlinks
Added the *ignore_dangling_symlinks* argument to silent dangling symlinks
errors when *symlinks* is false.
errors when *symlinks* is false.
.. versionchanged:: 3.3
Copy metadata when *symlinks* is false.
.. versionchanged:: 3.3
Added return of the *dst*.
.. function:: rmtree(path, ignore_errors=False, onerror=None)
.. function:: rmtree(path, ignore_errors=False, onerror=None)
...
@@ -244,9 +236,7 @@ Directory and files operations
...
@@ -244,9 +236,7 @@ Directory and files operations
.. versionchanged:: 3.3
.. versionchanged:: 3.3
Added explicit symlink handling for foreign filesystems, thus adapting
Added explicit symlink handling for foreign filesystems, thus adapting
it to the behavior of GNU's :program:`mv`.
it to the behavior of GNU's :program:`mv`.
Now returns *dst*.
.. versionchanged:: 3.3
Added return of the *dst*.
.. function:: disk_usage(path)
.. function:: disk_usage(path)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment