Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/shutil.pyo
mò ‚=5Dc�������� ���@���së���d��Z��d�k�Z�d�k�Z�d�k�Z�d�k�Z�d�k�l�Z�d�d�d�d�d�d�d �d �d�d�g �Z�d�e�i�f�d �„��ƒ��YZ �d�d�d�„�Z �d�„��Z�d�„��Z�d�„��Z �d�„��Z�d�„��Z�d�„��Z�e�d�„�Z�e�d�d�„�Z�d�„��Z�d�„��Z�d�S(���s‰���Utility functions for copying files and directory trees. XXX The functions here don't copy the resource fork or other metadata on Mac. N(���s���abspatht���copyfileobjt���copyfilet���copymodet���copystatt���copyt���copy2t���copytreet���movet���rmtreet���Errorc�����������B���s���t��Z�RS(���N(���t���__name__t ���__module__(����(����(����t���/usr/lib/python2.4/shutil.pyR ������s���i���i���c���������C���s4���x-�|��i�|�ƒ�}�|�p�Pn�|�i�|�ƒ�q�Wd�S(���s=���copy data from file-like object fsrc to file-like object fdsti���N(���t���fsrct���readt���lengtht���buft���fdstt���write(���R ���R���R���R���(����(����R���R�������s�������c���������C���s‚���t��t�i�d�ƒ�o5�y�t�i�i�|��|�ƒ�SWqH�t�j �o�t�SqH�Xn�t�i�i�t�i�i �|��ƒ�ƒ�t�i�i�t�i�i �|�ƒ�ƒ�j�S(���Nt���samefile( ���t���hasattrt���ost���pathR���t���srct���dstt���OSErrort���Falset���normcaset���abspath(���R���R���(����(����R���t ���_samefile���s���� c���������C���s”���t��|��|�ƒ�o�t�d�|��|�f�‚�n�d�}�d�}�z/�t�|��d�ƒ�}�t�|�d�ƒ�}�t�|�|�ƒ�Wd�|�o�|�i �ƒ��n�|�o�|�i �ƒ��n�Xd�S(���s���Copy data from src to dsts���`%s` and `%s` are the same filet���rbt���wbN( ���R���R���R���R ���t���NoneR ���R���t���openR����t���close(���R���R���R���R ���(����(����R���R���'���s������c���������C���sI���t��t�d�ƒ�o5�t�i�|��ƒ�}�t�i�|�i�ƒ�}�t�i�|�|�ƒ�n�d�S(���s���Copy mode bits from src to dstt���chmodN( ���R���R���t���statR���t���stt���S_IMODEt���st_modet���modeR#���R���(���R���R���R%���R(���(����(����R���R���8���s �����c���������C���sy���t��i�|��ƒ�}�t�i�|�i�ƒ�}�t�t��d�ƒ�o �t��i�|�|�i �|�i�f�ƒ�n�t�t��d�ƒ�o�t��i�|�|�ƒ�n�d�S(���s?���Copy all stat info (mode bits, atime and mtime) from src to dstt���utimeR#���N( ���R���R$���R���R%���R&���R'���R(���R���R)���R���t���st_atimet���st_mtimeR#���(���R���R���R%���R(���(����(����R���R���?���s����� c���������C���sV���t��i�i�|�ƒ�o%�t��i�i�|�t��i�i�|��ƒ�ƒ�}�n�t�|��|�ƒ�t�|��|�ƒ�d�S(���sV���Copy data and mode bits ("cp src dst"). The destination may be a directory. N( ���R���R���t���isdirR���t���joint���basenameR���R���R���(���R���R���(����(����R���R���I���s �����% c���������C���sV���t��i�i�|�ƒ�o%�t��i�i�|�t��i�i�|��ƒ�ƒ�}�n�t�|��|�ƒ�t�|��|�ƒ�d�S(���s]���Copy data and all stat info ("cp -p src dst"). The destination may be a directory. N( ���R���R���R,���R���R-���R.���R���R���R���(���R���R���(����(����R���R���T���s �����% c���������C���sI��t��i�|��ƒ�} �t��i�|�ƒ�g��}�x| �D]}�t��i�i �|��|�ƒ�}�t��i�i �|�|�ƒ�}�yu�|�o6�t��i�i �|�ƒ�o#�t��i�|�ƒ�} �t��i�| �|�ƒ�n5�t��i�i�|�ƒ�o�t�|�|�|�ƒ�n�t�|�|�ƒ�Wq)�t�t��i�f�j �o�}�|�i�|�|�|�f�ƒ�q)�t�j �o�}�|�i�|�i�d�ƒ�q)�Xq)�W|�o �t�|�‚�n�d�S(���sÕ��Recursively copy a directory tree using copy2(). The destination directory must not already exist. If exception(s) occur, an Error is raised with a list of reasons. If the optional symlinks flag is true, symbolic links in the source tree result in symbolic links in the destination tree; if it is false, the contents of the files pointed to by symbolic links are copied. XXX Consider this example code rather than the ultimate tool. i����N(���R���t���listdirR���t���namest���mkdirR���t���errorst���nameR���R-���t���srcnamet���dstnamet���symlinkst���islinkt���readlinkt���linktot���symlinkR,���R���R���t���IOErrort���errort���whyt���appendR ���t���errt���extendt���args(���R���R���R6���R2���R3���R?���R5���R=���R4���R0���R9���(����(����R���R���`���s*���� � �c���������C���s†��|�o �d�„��}�n�|�d�j�o �d�„��}�n�g��}�y�t�i�|��ƒ�}�Wn1�t�i�j �o"�}�|�t�i�|��t �i �ƒ��ƒ�n�XxÁ�|�D]¹�}�t�i�i�|��|�ƒ�}�y�t�i�|�ƒ�i�}�Wn�t�i�j �o �d�}�n�Xt�i�|�ƒ�o�t�|�|�|�ƒ�q‚�y�t�i�|�ƒ�Wq‚�t�i�j �o"�}�|�t�i�|�t �i �ƒ��ƒ�q‚�Xq‚�Wy�t�i�|��ƒ�Wn/�t�i�j �o �|�t�i�|��t �i �ƒ��ƒ�n�Xd�S(���sÁ��Recursively delete a directory tree. If ignore_errors is set, errors are ignored; otherwise, if onerror is set, it is called to handle the error with arguments (func, path, exc_info) where func is os.listdir, os.remove, or os.rmdir; path is the argument to that function that caused it to fail; and exc_info is a tuple returned by sys.exc_info(). If ignore_errors is false and onerror is None, an exception is raised. c����������G���s���d��S(���N(����(���RA���(����(����R���t���onerror’���s����c����������G���s���‚��d��S(���N(����(���RA���(����(����R���RB���•���s����i����N(���t ���ignore_errorsRB���R ���R0���R���R/���R���R<���R?���t���syst���exc_infoR3���R-���t���fullnamet���lstatR'���R(���R$���t���S_ISDIRR���t���removet���rmdir(���R���RC���RB���R3���R?���R0���RF���R(���(����(����R���R���†���s6���� � �"c���������C���s£���y�t��i�|��|�ƒ�Wnˆ�t�j �o|�t��i�i�|��ƒ�oH�t�|��|�ƒ�o�t�d�|��|�f�‚�n�t �|��|�d�t �ƒt�|��ƒ�qŸ�t�|��|�ƒ�t��i �|��ƒ�n�Xd�S(���s=��Recursively move a file or directory to another location. If the destination is on our current filesystem, then simply use rename. Otherwise, copy src to the dst and then remove src. A lot more could be done here... A look at a mv.c shows a lot of the issues this implementation glosses over. s.���Cannot move a directory '%s' into itself '%s'.R6���N(���R���t���renameR���R���R���R���R,���t ���destinsrcR ���R���t���TrueR���R���t���unlink(���R���R���(����(����R���R���®���s����� c���������C���s���t��|�ƒ�i�t��|��ƒ�ƒ�S(���N(���R���R���t ���startswithR���(���R���R���(����(����R���RL���Ä���s����(���t���__doc__R���RD���R$���t ���exceptionst���os.pathR���t���__all__t���EnvironmentErrorR ���R����R���R���R���R���R���R���R���R���R ���R���R���RL���(���R���R���R$���R���R���RS���R���R���R���RD���RL���R���R���R ���RQ���R����R���R���(����(����R���t���?���s$��� $ &(