Ë
    ¹ûàgg  ã                   ó<   — d Z ddlZddlmZmZ ddlmZ dgZ	 dd„Zy)zž
Move a file in the safest way possible::

    >>> from django.core.files.move import file_move_safe
    >>> file_move_safe("/tmp/old_file", "/tmp/new_file")
é    N)ÚcopymodeÚcopystat)ÚlocksÚfile_move_safec           
      ór  — 	 t         j                  j                  | |«      ry	 |s3t        j                  |t         j
                  «      rt        d|› d�«      ‚	 t        j                  | |«       y# t        $ r Y ŒXw xY w# t        $ r Y nw xY wt        | d«      5 }t        j                  |t         j                  t         j                  z  t        t         dd«      z  |st         j                  ndz  «      }	 t        j                  |t        j                  «       d}|dk7  r-|j!                  |«      }t        j"                  ||«       |dk7  rŒ-t        j$                  |«       t        j&                  |«       n/# t        j$                  |«       t        j&                  |«       w xY w	 ddd«       n# 1 sw Y   nxY w	 t)        | |«       n,# t*        $ r  	 t-        | |«       n# t*        $ r Y nw xY wY nw xY w	 t        j.                  | «       y# t*        $ r}t        |dd«      d	k7  r‚ Y d}~yd}~ww xY w)
aU  
    Move a file from one location to another in the safest way possible.

    First, try ``os.rename``, which is simple but will break across filesystems.
    If that fails, stream manually from one file to another in pure Python.

    If the destination file exists and ``allow_overwrite`` is ``False``, raise
    ``FileExistsError``.
    NzDestination file z% exists and allow_overwrite is False.ÚrbÚO_BINARYr   ó    Úwinerroré    )ÚosÚpathÚsamefileÚOSErrorÚaccessÚF_OKÚFileExistsErrorÚrenameÚopenÚO_WRONLYÚO_CREATÚgetattrÚO_EXCLr   ÚlockÚLOCK_EXÚreadÚwriteÚunlockÚcloser   ÚPermissionErrorr   Úremove)Úold_file_nameÚnew_file_nameÚ
chunk_sizeÚallow_overwriteÚold_fileÚfdÚcurrent_chunkÚes           úT/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/django/core/files/move.pyr   r      s÷  € ðÜ�7‰7×Ñ˜M¨=Ô9Øð :ñ
 œrŸy™y¨¼¿¹Ô@ÜØ ˜Ð.SÐTó
ð 	
ðÜ
�	‰	�- Ô/Øøô ò Ùðûô ò ñ 	ðúô 
ˆm˜TÓ	"ð  hä�W‰WØä—‘Ü—*‘*ñäœ"˜j¨!Ó,ñ-ñ %4”2—9’9¸ñ<ó
ˆð	Ü�J‰J�rœ5Ÿ=™=Ô)Ø ˆMØ 3Ò&Ø (§¡¨jÓ 9�Ü—‘˜˜]Ô+ð   3Ó&ô �L‰L˜ÔÜ�H‰H�R�Løô �L‰L˜ÔÜ�H‰H�R�LúˆL÷'÷ ñ úð*
Ü� Õ.øÜò ð
	Ü�] MÕ2øÜò 	Ùð	üðúðÜ
�	‰	�-Õ øÜò ô
 �1�j !Ó$¨Ò*Øô +ûðús—   ‚ A1 ÁB  Á1	A=Á<A=Â 	BÂBÂAF5Ã9AE<Å+F5Å<,F(Æ(F5Æ5F>ÇG Ç	G8ÇG&Ç%G8Ç&	G2Ç/G8Ç1G2Ç2G8Ç7G8Ç<H È	H6ÈH1È1H6)i   F)	Ú__doc__r   Úshutilr   r   Údjango.core.filesr   Ú__all__r   © r
   r*   ú<module>r0      s*   ðñó 
ß %å #àÐ
€ð INôJr
   