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
ec32b6bc
Kaydet (Commit)
ec32b6bc
authored
Ock 06, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#1559684: document that shutil.copy* doesn't copy all metadata on Posix and Windows too.
üst
14aaee14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
shutil.rst
Doc/library/shutil.rst
+13
-8
No files found.
Doc/library/shutil.rst
Dosyayı görüntüle @
ec32b6bc
...
@@ -17,16 +17,21 @@ copying and removal. For operations on individual files, see also the
...
@@ -17,16 +17,21 @@ copying and removal. For operations on individual files, see also the
:mod:`os` module.
:mod:`os` module.
.. warning::
.. warning::
Even the higher-level file copying functions (:func:`copy`, :func:`copy2`)
can't copy all file metadata.
On MacOS, the resource fork and other metadata are not used. For file copies,
On POSIX platforms, this means that file owner and group are lost as well
this means that resources will be lost and file type and creator codes will
as ACLs. On MacOS, the resource fork and other metadata are not used.
not be correct.
This means that resources will be lost and file type and creator codes will
not be correct. On Windows, file owners, ACLs and alternate data streams
are not copied.
.. function:: copyfile(src, dst)
.. function:: copyfile(src, dst)
Copy the contents
of the file named *src* to a file named *dst*. The
Copy the contents
(no metadata) of the file named *src* to a file named *dst*.
destination location must be writable; otherwise, an :exc:`IOError` exception
The
destination location must be writable; otherwise, an :exc:`IOError` exception
will be raised. If *dst* already exists, it will be replaced. Special files
will be raised. If *dst* already exists, it will be replaced. Special files
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.
...
@@ -81,7 +86,7 @@ copying and removal. For operations on individual files, see also the
...
@@ -81,7 +86,7 @@ copying and removal. For operations on individual files, see also the
files are copied to the new tree. If exception(s) occur, an :exc:`Error` is
files are copied to the new tree. If exception(s) occur, an :exc:`Error` is
raised with a list of reasons.
raised with a list of reasons.
The source code for this should be considered an example rather than
a tool.
The source code for this should be considered an example rather than a tool.
.. versionchanged:: 2.3
.. versionchanged:: 2.3
:exc:`Error` is raised if any exceptions occur during copying, rather than
:exc:`Error` is raised if any exceptions occur during copying, rather than
...
@@ -114,7 +119,7 @@ copying and removal. For operations on individual files, see also the
...
@@ -114,7 +119,7 @@ copying and removal. For operations on individual files, see also the
Recursively move a file or directory to another location.
Recursively move a file or directory to another location.
If the destination is on
our
current filesystem, then simply use rename.
If the destination is on
the
current filesystem, then simply use rename.
Otherwise, copy src to the dst and then remove src.
Otherwise, copy src to the dst and then remove src.
.. versionadded:: 2.3
.. versionadded:: 2.3
...
@@ -122,7 +127,7 @@ copying and removal. For operations on individual files, see also the
...
@@ -122,7 +127,7 @@ copying and removal. For operations on individual files, see also the
.. exception:: Error
.. exception:: Error
This exception collects exceptions that raised during a mult-file operation. For
This exception collects exceptions that raised during a mult
i
-file operation. For
:func:`copytree`, the exception argument is a list of 3-tuples (*srcname*,
:func:`copytree`, the exception argument is a list of 3-tuples (*srcname*,
*dstname*, *exception*).
*dstname*, *exception*).
...
...
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