Python/shutil

من موسوعة حسوب
< Python
مراجعة 11:28، 27 يوليو 2018 بواسطة مصطفى-عطا (نقاش | مساهمات) (إنشاء مبدئي)
(فرق) → مراجعة أقدم | المراجعة الحالية (فرق) | مراجعة أحدث ← (فرق)
اذهب إلى التنقل اذهب إلى البحث

The shutil module offers a number of high-level operations on files and collections of files. In particular, functions are provided which support file copying and removal. For operations on individual files, see also the osmodule.

Warning 

Even the higher-level file copying functions (shutil.copy()shutil.copy2()) cannot copy all file metadata.

On POSIX platforms, this means that file owner and group are lost as well as ACLs. On Mac OS, the resource fork and other metadata are not used. 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.

11.10.1. Directory and files operations