/snap/core24/1587/usr/lib/python3.12/__pycache__
NameSizeModeActions
abc.cpython-312.pyc80550644editdlrm
aifc.cpython-312.pyc428630644editdlrm
antigravity.cpython-312.pyc10030644editdlrm
argparse.cpython-312.pyc1016820644editdlrm
ast.cpython-312.pyc1002790644editdlrm
base64.cpython-312.pyc244080644editdlrm
bdb.cpython-312.pyc373590644editdlrm
bisect.cpython-312.pyc36410644editdlrm
bz2.cpython-312.pyc151330644editdlrm
calendar.cpython-312.pyc396210644editdlrm
cgi.cpython-312.pyc402280644editdlrm
cgitb.cpython-312.pyc173320644editdlrm
chunk.cpython-312.pyc73100644editdlrm
cmd.cpython-312.pyc186190644editdlrm
code.cpython-312.pyc130510644editdlrm
codecs.cpython-312.pyc422740644editdlrm
codeop.cpython-312.pyc69160644editdlrm
colorsys.cpython-312.pyc46420644editdlrm
compileall.cpython-312.pyc204970644editdlrm
configparser.cpython-312.pyc635820644editdlrm
contextlib.cpython-312.pyc303760644editdlrm
contextvars.cpython-312.pyc2610644editdlrm
copy.cpython-312.pyc98000644editdlrm
copyreg.cpython-312.pyc74140644editdlrm
cProfile.cpython-312.pyc85930644editdlrm
crypt.cpython-312.pyc53610644editdlrm
csv.cpython-312.pyc177880644editdlrm
dataclasses.cpython-312.pyc446780644editdlrm
datetime.cpython-312.pyc4090644editdlrm
decimal.cpython-312.pyc4060644editdlrm
difflib.cpython-312.pyc754990644editdlrm
dis.cpython-312.pyc345600644editdlrm
doctest.cpython-312.pyc1056860644editdlrm
enum.cpython-312.pyc807080644editdlrm
filecmp.cpython-312.pyc146610644editdlrm
fileinput.cpython-312.pyc202800644editdlrm
fnmatch.cpython-312.pyc64950644editdlrm
fractions.cpython-312.pyc366670644editdlrm
ftplib.cpython-312.pyc426360644editdlrm
functools.cpython-312.pyc405060644editdlrm
genericpath.cpython-312.pyc68220644editdlrm
getopt.cpython-312.pyc83630644editdlrm
getpass.cpython-312.pyc68500644editdlrm
gettext.cpython-312.pyc221510644editdlrm
glob.cpython-312.pyc98410644editdlrm
graphlib.cpython-312.pyc103270644editdlrm
gzip.cpython-312.pyc320150644editdlrm
hashlib.cpython-312.pyc80870644editdlrm
heapq.cpython-312.pyc179560644editdlrm
hmac.cpython-312.pyc106980644editdlrm
imaplib.cpython-312.pyc628890644editdlrm
imghdr.cpython-312.pyc69440644editdlrm
inspect.cpython-312.pyc1334460644editdlrm
io.cpython-312.pyc41390644editdlrm
ipaddress.cpython-312.pyc907620644editdlrm
keyword.cpython-312.pyc10410644editdlrm
linecache.cpython-312.pyc64010644editdlrm
locale.cpython-312.pyc595360644editdlrm
lzma.cpython-312.pyc158550644editdlrm
mailbox.cpython-312.pyc1116180644editdlrm
mailcap.cpython-312.pyc111550644editdlrm
mimetypes.cpython-312.pyc241850644editdlrm
modulefinder.cpython-312.pyc279440644editdlrm
netrc.cpython-312.pyc89030644editdlrm
nntplib.cpython-312.pyc449390644editdlrm
ntpath.cpython-312.pyc260330644editdlrm
nturl2path.cpython-312.pyc30340644editdlrm
numbers.cpython-312.pyc139670644editdlrm
opcode.cpython-312.pyc147160644editdlrm
operator.cpython-312.pyc173640644editdlrm
optparse.cpython-312.pyc675460644editdlrm
os.cpython-312.pyc434740644editdlrm
pathlib.cpython-312.pyc620980644editdlrm
pdb.cpython-312.pyc849190644editdlrm
pickle.cpython-312.pyc761760644editdlrm
pickletools.cpython-312.pyc811280644editdlrm
pipes.cpython-312.pyc109140644editdlrm
pkgutil.cpython-312.pyc199590644editdlrm
platform.cpython-312.pyc416000644editdlrm
plistlib.cpython-312.pyc412860644editdlrm
poplib.cpython-312.pyc184460644editdlrm
posixpath.cpython-312.pyc182360644editdlrm
pprint.cpython-312.pyc294740644editdlrm
profile.cpython-312.pyc225400644editdlrm
pstats.cpython-312.pyc379220644editdlrm
pty.cpython-312.pyc73630644editdlrm
pyclbr.cpython-312.pyc148870644editdlrm
pydoc.cpython-312.pyc1429550644editdlrm
py_compile.cpython-312.pyc100780644editdlrm
queue.cpython-312.pyc147320644editdlrm
quopri.cpython-312.pyc93230644editdlrm
random.cpython-312.pyc331530644editdlrm
reprlib.cpython-312.pyc99090644editdlrm
rlcompleter.cpython-312.pyc82820644editdlrm
runpy.cpython-312.pyc143850644editdlrm
sched.cpython-312.pyc77350644editdlrm
secrets.cpython-312.pyc25560644editdlrm
selectors.cpython-312.pyc261280644editdlrm
shelve.cpython-312.pyc129130644editdlrm
shlex.cpython-312.pyc141620644editdlrm
shutil.cpython-312.pyc681130644editdlrm
signal.cpython-312.pyc44480644editdlrm
site.cpython-312.pyc290630644editdlrm
sitecustomize.cpython-312.pyc3000644editdlrm
smtplib.cpython-312.pyc482210644editdlrm
sndhdr.cpython-312.pyc107120644editdlrm
socket.cpython-312.pyc418170644editdlrm
socketserver.cpython-312.pyc342580644editdlrm
sre_compile.cpython-312.pyc6250644editdlrm
sre_constants.cpython-312.pyc6280644editdlrm
sre_parse.cpython-312.pyc6210644editdlrm
ssl.cpython-312.pyc630110644editdlrm
stat.cpython-312.pyc52310644editdlrm
statistics.cpython-312.pyc554230644editdlrm
string.cpython-312.pyc114820644editdlrm
stringprep.cpython-312.pyc251600644editdlrm
struct.cpython-312.pyc3250644editdlrm
subprocess.cpython-312.pyc791870644editdlrm
sunau.cpython-312.pyc254230644editdlrm
symtable.cpython-312.pyc187810644editdlrm
sysconfig.cpython-312.pyc300010644editdlrm
tabnanny.cpython-312.pyc121560644editdlrm
tarfile.cpython-312.pyc1233880644editdlrm
telnetlib.cpython-312.pyc284230644editdlrm
tempfile.cpython-312.pyc473390644editdlrm
textwrap.cpython-312.pyc182930644editdlrm
this.cpython-312.pyc14080644editdlrm
threading.cpython-312.pyc653460644editdlrm
timeit.cpython-312.pyc148640644editdlrm
token.cpython-312.pyc35570644editdlrm
tokenize.cpython-312.pyc247750644editdlrm
trace.cpython-312.pyc330240644editdlrm
traceback.cpython-312.pyc515230644editdlrm
tracemalloc.cpython-312.pyc269070644editdlrm
tty.cpython-312.pyc26680644editdlrm
turtle.cpython-312.pyc1846320644editdlrm
types.cpython-312.pyc149390644editdlrm
typing.cpython-312.pyc1418600644editdlrm
uu.cpython-312.pyc78160644editdlrm
uuid.cpython-312.pyc330070644editdlrm
warnings.cpython-312.pyc237920644editdlrm
wave.cpython-312.pyc320840644editdlrm
weakref.cpython-312.pyc313480644editdlrm
webbrowser.cpython-312.pyc263530644editdlrm
xdrlib.cpython-312.pyc118410644editdlrm
zipapp.cpython-312.pyc99770644editdlrm
zipimport.cpython-312.pyc244750644editdlrm
_aix_support.cpython-312.pyc47590644editdlrm
_collections_abc.cpython-312.pyc459120644editdlrm
_compat_pickle.cpython-312.pyc72210644editdlrm
_compression.cpython-312.pyc74970644editdlrm
_distutils_system_mod.cpython-312.pyc78180644editdlrm
_markupbase.cpython-312.pyc122790644editdlrm
_osx_support.cpython-312.pyc177310644editdlrm
_pydatetime.cpython-312.pyc941930644editdlrm
_pydecimal.cpython-312.pyc2278070644editdlrm
_pyio.cpython-312.pyc1102690644editdlrm
_pylong.cpython-312.pyc99830644editdlrm
_py_abc.cpython-312.pyc70540644editdlrm
_sitebuiltins.cpython-312.pyc47600644editdlrm
_strptime.cpython-312.pyc241160644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-312.pyc586510644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-312.pyc586450644editdlrm
_threading_local.cpython-312.pyc82950644editdlrm
_weakrefset.cpython-312.pyc117510644editdlrm
__future__.cpython-312.pyc47040644editdlrm
__hello__.cpython-312.pyc8700644editdlrm
Edit: /snap/core24/1587/usr/lib/python3.12/__pycache__/shutil.cpython-312.pyc (68113B)
ЦiVdZddlZddlZddlZddlZddlZddlZddlZ ddlZ[dZ ddl Z [ dZ ddl Z [ dZejdk(ZdxZZejdk(rddlZnerddlZej&dk(rddlZndZerdnd Zeed xrej&j/d aexr eed Zd ZgdZGddeZGddeZGddeZGddeZ GddeZ!Gdde"Z#Gdde"Z$dZ%dZ&efdZ'drd Z(d!Z)d"Z*d#Z+dd$d%Z,dd$d&Z-eed'rdd$d(Z.nd)Z.dd$d*Z/dd$d+Z0dd$d,Z1d-Z2 dsd.Z3dde1ddfd/Z4eejjd0rd1Z6nd2Z6d3Z7d4Z8ejrejejtejvhejxkxr2ejzej|vxrejej~vZ@dtddd5d6ZAe@eA_Bd7ZCe1fd8ZDd9ZEd:ZFd;ZGd<ZH dud=ZI dvd>ZJdeI_KdeJ_Kd?eId@gdAfiZLe reIdBgdCfeLdD<eJgdEfeLdF<e r eIdGgdHfeLdI<er eIdJgdKfeLdL<dMZMdwdNZNdOZO dxdPZPdQZQdRZR dwdSZSdTZTdUZUdVZVddWdXZWdYgeWgdAfdZgeVgdEfd[ZXe r d\d]geWgdCfeXdD<e r d^d_geWgdHfeXdI<er d`dageWgdKfeXdL<dbZYdyddWdcZZeeddr[ejdeejdfdgZ]dhe]j_die]j_dje]j_dkZan)er'ejdeejdfdgZ]dlZadydmZbdzdnZcdoZddpZeejejzdfdqZhy#e $rdZ YdwxYw#e $rdZ YjwxYw#e $rdZYpwxYw){zUtility functions for copying and archiving files and directory trees. XXX The functions here don't copy the resource fork or other metadata on Mac. NTFntposixwin32iisendfilelinux _fcopyfilez%.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC) copyfileobjcopyfilecopymodecopystatcopycopy2copytreemovermtreeErrorSpecialFileError ExecError make_archiveget_archive_formatsregister_archive_formatunregister_archive_formatget_unpack_formatsregister_unpack_formatunregister_unpack_formatunpack_archiveignore_patternschownwhichget_terminal_size SameFileErrorc eZdZy)rN)__name__ __module__ __qualname__/usr/lib/python3.12/shutil.pyrrCsr'rceZdZdZy)r!z5Raised when source and destination are the same file.Nr#r$r%__doc__r&r'r(r!r!Fs?r'r!ceZdZdZy)rz|Raised when trying to do a kind of operation (e.g. copying) which is not supported on a special file (e.g. a named pipe)Nr*r&r'r(rrIs;r'rceZdZdZy)rz+Raised when a command could not be executedNr*r&r'r(rrMs5r'rceZdZdZy) ReadErrorz%Raised when an archive cannot be readNr*r&r'r(r/r/Ps/r'r/ceZdZdZy) RegistryErrorzVRaised when a registry operation with the archiving and unpacking registries failsNr*r&r'r(r1r1Ss&r'r1ceZdZdZy)_GiveupOnFastCopyzuRaised as a signal to fallback on using raw read()/write() file copy when fast-copy functions fail to do so. Nr*r&r'r(r3r3Wsr'r3c |j}|j} tj|||y#t$r}t|d}~wwxYw#t $ra}|j |_|j |_|jtjtjhvr t||dd}~wwxYw)zhCopy a regular file content or metadata by using high-performance fcopyfile(3) syscall (macOS). N) fileno Exceptionr3rrOSErrornamefilename filename2errnoEINVALENOTSUP)fsrcfdstflagsinfdoutfderrs r(_fastcopy_fcopyfilerD\s%{{}   ue, %$$%  yy   99u}}5 5#C( (4   s- ;A A AA C AB<<Cc |j}|j} tt j |j d}tjdkr t|d}d} t j||||}|dk(ry||z }%#t$r}t|d}~wwxYw#t$rd}YpwxYw#t$r}|j|_ |j|_|jtj k(r dat||jtj$k(r|d|dk(r3t j&|dtj(dk(r t||d}~wwxYw)zCopy data from one regular mmap-like fd to another by using high-performance sendfile(2) syscall. This should work on Linux >= 2.6.33 only. Niili@rF)r5r6r3maxosfstatst_sizer7sysmaxsizeminrr8r9r:r;ENOTSOCK_USE_CP_SENDFILEENOSPClseekSEEK_CUR)r>r?rArBrC blocksizeoffsetsents r(_fastcopy_sendfilerUpsV%{{} ..8  {{W 7+ F  ;;udFI>D,qy dNF5 % %$$%   99CL IICMyyENN*$) ',,yyELL(t#{rxxq"++>!C',,I' sA B)B//C B, B''B,/ B=<B= E4 B&E//E4c|j}|j}tt|5} ||}|sn%||kr|d|5}||dddn ||0dddy#1swYxYw#1swYyxYw)zreadinto()/memoryview() based variant of copyfileobj(). *fsrc* must support readinto() method and both files must be open in binary mode. N)readintowrite memoryview bytearray)r>r?length fsrc_readinto fdst_writemvnsmvs r(_copyfileobj_readintoras MMMJ If% & "b!AVV$ssO$2   $$  s#A4 A( A4(A1 -A44A=c|st}|j}|j}||x}r||||x}ryy)z=copy data from file-like object fsrc to file-like object fdstN) COPY_BUFSIZEreadrX)r>r?r[ fsrc_readr]bufs r(r r sE  IJ6" "# "36" "# "r'ct|tjr\ttjdrB tjj |j tj |Sttjdr! tjj||Stjjtjj|tjjtjj|k(S#t$rYywxYw#t$rYywxYw)NsamestatFsamefile) isinstancerGDirEntryhasattrpathrhstatr7rinormcaseabspathsrcdsts r( _samefilerts#r{{#(D 77##CHHJ = =rww # 77##C- - GG  RWW__S1 2 GG  RWW__S1 2 34     s$AD+D:+ D76D7: EEct|tjr|jStj|SN)rjrGrkrnfns r(_statrys("2r{{32779DDr'ct|tjr|jStjj |Srv)rjrGrk is_symlinkrmislinkrws r(_islinkr}s-(R[[92==?Qrww~~b?QQr'follow_symlinksc tjd||t||rtdj ||d}t ||gD]\}} t |}tj|jr6t|tjr |jn|}td|ztsn|dk(st|j }|s6t%|r+tj&tj(|||St+|d5} t+|d5}t,r0 t/||t0j2|cdddcdddSt6r! t9|||cdddcdddStr4|dkDr/t;||t=|t>|cdddcdddStA||dddddd|S#t"$rYwxYw#t4$rY9wxYw#t4$rYHwxYw#1swYAxYw#tB$r4} tjjE|stGd|| d} ~ wwxYw#1swY|SxYw) zCopy data from src to dst in the most efficient way possible. If follow_symlinks is not set and src is a symbolic link, a new symlink will be created instead of copying the file it points to. zshutil.copyfilez{!r} and {!r} are the same filerz`%s` is a named piperbwbNzDirectory does not exist: )$rJauditrtr!format enumerateryrnS_ISFIFOst_moderjrGrkrmr_WINDOWSrIr7r}symlinkreadlinkopen_HAS_FCOPYFILErDr_COPYFILE_DATAr3rNrUrarLrcr IsADirectoryErrorexistsFileNotFoundError) rrrsr file_sizeirxstr>r?es r(r r sCIIc*c=DDS#NOOIC:& '2 'rB }}RZZ( *2r{{ ;RWW&'='BCCAFJJ  ' ws| 2;;s#S)D JA#t_  #t_,%!/dE._nopirr'c&tt|Srv)getattrrG)r8rs r(lookupzcopystat..lookupps2tT* *r'cRtt|}|tjvr|SSrv)rrGsupports_follow_symlinks)r8rxrs r(rzcopystat..lookupus)T4(BR000 Kr'r~rnutimerrTrc(tj|yrv)rGrrs r(_chmodzcopystat.._chmods $r'st_flagschflags) EOPNOTSUPPr=)rJrr}rGrmr|rjrkrnrr st_atime_ns st_mtime_nsrr8rNotImplementedErrorrlrr7r;r) rrrsrfollowrrmoderwhyrCrs @r(r r [sIIc*T  JWS\%IbggnnS6I JF  +   #r{{# XXfX - VF^C 8 << #DF7OCR^^R^^< sC0 G_F ww$ ww~~c"gg&&s4&8   sD&1r:  F9 c2;; G       . 5#&399s8K+K  s6 F)F FF G G4GGG ctjj|r=tjj|tjj |}t |||t ||||S)a3Copy data and mode bits ("cp src dst"). Return the file's destination. The destination may be a directory. If follow_symlinks is false, symlinks won't be followed. This resembles GNU's "cp -P src dst". If source and destination are the same file, a SameFileError will be raised. r~)rGrmisdirjoinbasenamer r )rrrsrs r(r r sT ww}}Sggll3 0 0 56 S#7 S#7 Jr'ctjj|r=tjj|tjj |}t t dritj|}tj|}t j}|s|t jz} t j||||St|||t!||||S#t$rI}|jt jk(r|sn|jt jk(rnYd}~kd}~wwxYw)a0Copy data and metadata. Return the file's destination. Metadata is copied with copystat(). Please see the copystat function for more information. The destination may be a directory. If follow_symlinks is false, symlinks won't be followed. This resembles GNU's "cp -P src dst". CopyFile2Nr~)rGrmrrrrl_winapifsdecode%COPY_FILE_ALLOW_DECRYPTED_DESTINATIONCOPY_FILE_COPY_SYMLINKrr7winerrorERROR_PRIVILEGE_NOT_HELDERROR_ACCESS_DENIEDr r )rrrsrsrc_dst_r@excs r(rrs ww}}Sggll3 0 0 56w ${{3{{3== W33 3E    dD% 0J S#7 S#7 J   @ @@'!._ignore_patternss=  AG  w!? @ A=!!r'r&)rrs` r(rrs " r'c X|5|tj||Dcgc]}|jc}} nd} tj||g} |tuxs|t u} |D]|} | j| vrtj j|| j} tj j|| j}| r| n| } | j}|rDtjdk(r1| jd}|jtjk(rd}|rtj| }|r&tj||t||| nztj j|s|r&| j!rt#|||||||n5|||n+| j!rt#|||||||n ||| t||| r t%| |Scc}w#t$$r)}| j'|j(dYd}~d}~wt*$r(}| j-| |t/|fYd}~d}~wwxYw#t*$r4}t1|dd| j-||t/|fYd}~d}~wwxYw)Nr&)exist_okrFr~rr)rGfspathr8makedirsrr rmrr{rnst_reparse_tagIO_REPARSE_TAG_MOUNT_POINTrrr ris_dirrrrrr7appendstrr)entriesrrrssymlinksignore copy_functionignore_dangling_symlinks dirs_exist_okxrerrors use_srcentrysrcentrysrcnamedstnamesrcobjr{rlinktorCrs r( _copytreersR ryy~/H1/HI  KKm, F E)B]d-BL,8 ==M ) '',,sHMM2'',,sHMM2)w& 8!,,.Jbggo! e <''4+J+JJ!&JW-JJvw/VW(lK77>>&16N ( (F!.0H!.0&fg6"(FM1=Bfg.M,8Z0c Fm J{0Ib ' MM#((1+ & & 8 MM7GSX6 7 7 8 0 3 D ) 1 MM3SX. /0sIH B6H AH( I, I)H55 I)I$$I), J)5*J$$J)c tjd||tj|5}t |}dddt |||||||S#1swYxYw)a'Recursively copy a directory tree and return the destination directory. 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. If the file pointed by the symlink doesn't exist, an exception will be added in the list of errors raised in an Error exception at the end of the copy process. You can set the optional ignore_dangling_symlinks flag to true if you want to silence this exception. Notice that this has no effect on platforms that don't support os.symlink. The optional ignore argument is a callable. If given, it is called with the `src` parameter, which is the directory being visited by copytree(), and `names` which is the list of `src` contents, as returned by os.listdir(): callable(src, names) -> ignored_names Since copytree() is called recursively, the callable will be called once for each directory that is copied. It returns a list of names relative to the `src` directory that should not be copied. The optional copy_function argument is a callable that will be used to copy each file. It will be called with the source path and the destination path as arguments. By default, copy2() is used, but any function that supports the same signature (like copy()) can be used. If dirs_exist_ok is false (the default) and `dst` already exists, a `FileExistsError` is raised. If `dirs_exist_ok` is true, the copying operation will continue if it encounters existing directories, and files within the `dst` tree will be overwritten by corresponding files from the `src` tree. zshutil.copytreeN)rrrrsrrrrr)rJrrGscandirlistr) rrrsrrrrritrrs r(rr-saPIIc* CCs) W#3"-.F#0 22s AAst_file_attributesc tj|}tj|jxs<|j tj zxr|jtjk(S#t$rYywxYw)NF) rGrrnS_ISLNKrrFILE_ATTRIBUTE_REPARSE_POINTrrr7)rmrs r(_rmtree_islinkr^sr $BLL,K&&)J)JJJ&&$*I*II L  sA1A44 B?Bc@tjj|Srv)rGrmr|)rms r(rrgsww~~d##r'c: tj|5}t|}dddD]s}|j} |j d}|r:|j s* |jr td t||^ tj|u tj|y#1swYxYw#t$r$}|tj||g}Yd}~d}~wwxYw#t$rd}YwxYw#t$r-}|tjj||Yd}~ d}~wwxYw#t$r#}|tj||Yd}~:d}~wwxYw#t$r"}|tj||Yd}~yd}~wwxYw)NFr~%Cannot call rmtree on a symbolic link) rGrrr7rmr is_junctionr{r|_rmtree_unsafeunlinkrmdir)rmonexc scandir_itrrCentryfullnamers r(rrksm ZZ  ':&G ' 0:: \\%\8F %++- ##%""IJJ & 8U + 0 (#)0.# ; ' '  bjj$$ F  bggnnh4  0bii3// 0 # bhhc""#sC B:CC6"D E$E/:C?C C3C..C36 DD D="D88D= E, E''E,/ F8FFc N tj|5}t|}dddD]}tj j ||j} |jd}|r2 |jd} tj| j}|r tj|jtjtjz|} d} tj j! tj"| rHt%| || tj&| d} tj(|j|n td| rG tj&| _ tj,|j|y#1swYxYw#t$r)}||_|tj||Yd}~yd}~wwxYw#t$r#}|tj||Yd}~d}~wwxYw#t$rd}YwxYw#t$r%}d} |tj&||Yd}~d}~wwxYw#t$r#}|tj(||Yd}~d}~wwxYw#t$r-}|tj j*||Yd}~Vd}~wwxYw#t$r#}|tj&||Yd}~d}~wwxYw#| sE tj&| w#t$r"}|tj&||Yd}~wd}~wwxYwwxYw#t$r#}|tj||Yd}~Cd}~wwxYw#t$r#}|tj,||Yd}~rd}~wwxYw)NFr~dir_fdTr)rGrrr7r9rmrr8rrnS_ISDIRrrrO_RDONLY O_NONBLOCKrhrH_rmtree_safe_fdcloserr|r) topfdrmrrrrCrrrorig_stdirfd dirfd_closeds r(rrs ZZ  '*:&G ' 6077<<ejj1 \\%\8F#jjj?G!\\'//:F " ; BKK"--,GPUV$ ;ww''%A'x?;HHUO (, ;HHUZZ>A#*+1#22 (;HHUO 0 %**U3i60  ' '   bjj$$"((Hc2 F , ';+/L!"((Hc::; ';!"((Hc::; 'A!"''..(C@@A ';!"((Hc::;(;HHUO&;!"((Hc::;(7 .bggx-- .F 0bii3// 0sOF? F2F?H#11G4%AM )AK=*H5?K=!I&#K=% J5K !M82F<7F?? G1G,,G14 H =HH # H21H25 I#>IK=I##K=& J/J K= JK= K "KK=K  K= K:K55K:=MLM M L= 8M=M M M5M00M58 N$NN$)rr c@tjd|||rd}n|d}n | d}nfd}trt|trt j |} t j||} t j|t jt jz|}d} t jj|t j|r>t||| t j |d } t j$||n t#d |s t j |yy| t)d  t+|r t#d  t-||S#t$r"}|t j||Yd}~yd}~wwxYw#t$r"}|t j||Yd}~yd}~wwxYw#t"$r$}d }|t j ||Yd}~d}~wwxYw#t"$r"}|t j$||Yd}~d}~wwxYw#t"$r-}|t jj&||Yd}~6d}~wwxYw#t"$r"}|t j ||Yd}~yd}~wwxYw#|sE t j |w#t"$r"}|t j ||Yd}~wd}~wwxYwwxYw#t"$r,}|t jj&||Yd}~yd}~wwxYw) aRecursively delete a directory tree. If dir_fd is not None, it should be a file descriptor open to a directory; path will then be relative to that directory. dir_fd may not be implemented on your platform. If it is unavailable, using it will raise a NotImplementedError. If ignore_errors is set, errors are ignored; otherwise, if onexc or onerror is set, it is called to handle the error with arguments (func, path, exc_info) where func is platform and implementation dependent; path is the argument to that function that caused it to fail; and the value of exc_info describes the exception. For onexc it is the exception instance, and for onerror it is a tuple as returned by sys.exc_info(). If ignore_errors is false and both onexc and onerror are None, the exception is reraised. onerror is deprecated and only remains for backwards compatibility. If both onerror and onexc are set, onerror is ignored and onexc is used. z shutil.rmtreecyrvr&rs r(rzrmtree..onexcs r'Ncrvr&rs r(rzrmtree..onexcs r'crvr&rs r(rzrmtree..onexcsr'c^|\}}}|d}nt|||jf}|||S)N)NNN)type __traceback__)rfuncrmrexc_infoonerrors r(rzrmtree..onexcs="&dC;/H#Cy#s/@/@@HtT844r'r FTrz#dir_fd unavailable on this platform)rJr_use_fd_functionsrjbytesrGrrr6rr rrmrhrHrrr7rr|rrr) rm ignore_errorsrrr rrCfd fd_closeds ` r(rrs*IIotV,  U]   ?  5 dE ";;t$D hhtF3G r{{R]]:6JBI /ww"6D%0/HHRL ! /HHT&15!"IJJ/HHRL  %&KL L d#EFF$dE**]  "((D# &     "''4 %  / $I"((D#..//"((D#../ 5"''..$445 /"((D#..//HHRL/"((D#../  "''..$ ,  s!E;99F)3AJ4G J H#J% H53I.K(; F&F!!F&) G2GG H G?:J?HJ H2H-(J-H22J5 I+>"I& J&I++J. J7JJK% J65K%6 K!?KK%K!!K%( L1"LLctj|}tjjtjjxsdz}tjj |j |S)aHA basename() variant which first strips the trailing slash, if present. Thus we always get the last component of the path, even for directories. path: Union[PathLike, str] e.g. >>> os.path.basename('/bar/foo') 'foo' >>> os.path.basename('/bar/foo/') '' >>> _basename('/bar/foo/') 'foo' )rGrrmsepaltseprrstrip)rmr's r( _basenamer*:sN 99T?D ''++-2 .C 77  DKK, --r'c|tjd|||}tjj |rt ||r6tjj |stj||ytjj|t|}tjj|rtd|z tj|||S#t$rGtjj |rCtj|}tj||tj|Y|Stjj |rt!||rtd|d|dt#|sLtj$|tj&s:tj(|r%tj*dk(rt-d|d |dt/|||d t1|Y|S|||tj|Y|SwxYw) a.Recursively move a file or directory to another location. This is similar to the Unix "mv" command. Return the file or directory's destination. If dst is an existing directory or a symlink to a directory, then src is moved inside that directory. The destination path in that directory must not already exist. If dst already exists but is not a directory, it may be overwritten depending on os.rename() semantics. If the destination is on our current filesystem, then rename() is used. Otherwise, src is copied to the destination and then removed. Symlinks are recreated under the new name if os.rename() fails because of cross filesystem renames. The optional `copy_function` argument is a callable that will be used to copy the source or it will be delegated to `copytree`. By default, copy2() is used, but any function that supports the same signature (like copy()) can be used. A lot more could be done here... A look at a mv.c shows a lot of the issues this implementation glosses over. z shutil.moveNz$Destination path '%s' already existszCannot move a directory 'z' into itself 'z'.darwinz%Cannot move the non-empty directory 'z ': Lacking write permission to 'T)rr)rJrrGrmrrtr|renamerr*rrr7rrr _destinsrc _is_immutableaccessW_OKlistdirplatformPermissionErrorrr)rrrsrreal_dstrs r(rrLs4IImS#&H ww}}S S# rww~~c': IIc3  77<<Ys^4 77>>( #>IJ J #x , O+  77>># [[%F JJvx ( IIcN" O!WW]]3 #s#(+S233c"IIc2773 3LLH4%),c'344 S(-" $ 3K O #x ( IIcN O+s C**A)H;CH;H;:H;ctjj|}tjj|}|jtjjs|tjjz }|jtjjs|tjjz }|j |Srv)rGrmrpendswithr' startswithrqs r(r.r.s ''//# C ''//# C << $ rww{{ << $ rww{{ >># r'ct|}tjtjg}t |dxr|j |vS)Nr)ryrn UF_IMMUTABLE SF_IMMUTABLErlr)rrrimmutable_statess r(r/r/s> sB))4+<+<= 2z " Fr{{6F'FFr'cx|y ddlm} ||}||dSy#t$rYywxYw#t$rd}Y$wxYw)z"Returns a gid, given a group name.Nr)getgrnam)grpr> ImportErrorKeyError)r8r>results r(_get_gidrD^ | $ay   + (( 99cx|y ddlm} ||}||dSy#t$rYywxYw#t$rd}Y$wxYw)z"Returns an uid, given a user name.Nr)getpwnamr?)pwdrHrArB)r8rHrCs r(_get_uidrJrErFc .|d} nDtr|dk(rd} n6tr|dk(rd} n(tr|dk(rd} ntdj |d dl} |rd | znd} |d z| z} t jj| } | rJt jj| s+||jd | |st j| ||jd ttfd}|s^| j| d| z}|}| t jj||} |j!||||j#|t jj%| } | S#|j#wxYw)aCreate a (possibly compressed) tar file from all the files under 'base_dir'. 'compress' must be "gzip" (the default), "bzip2", "xz", or None. 'owner' and 'group' can be used to define an owner and a group for the archive that is being built. If not provided, the current owner and group will be used. The output tar file will be named 'base_name' + ".tar", possibly plus the appropriate compression extension (".gz", ".bz2", or ".xz"). Returns the output filename. Nr&gzipgzbzip2bz2xzzCbad value for 'compress', or compression format not supported : {0}r..tar creating %szCreating tar archivecH|_|_|_|_|Srv)gidgnameuiduname)tarinforUgroupownerrWs r( _set_uid_gidz#_make_tarball.._set_uid_gids. ?GK!GM ?GK!GMr'zw|%sr)_ZLIB_SUPPORTED_BZ2_SUPPORTED_LZMA_SUPPORTED ValueErrorrtarfilerGrmdirnamerinforrJrDrraddrrp) base_namebase_dircompressverbosedry_runr[rZloggerroot_dirtar_compressionrb compress_ext archive_name archive_dirr\tararcnamerUrWs `` @@r( _make_tarballrssr  X/ H/ X-++16(+;= =,43("Lv% 4L''//,/K277>>+6   KK { 3 KK $ *+ 5/C 5/C ll</)AB  ww||Hh7H  GGHglG ; IIKww|4  IIKs ;FFcddl}|dz} tjj|} | rJtjj | s+||j d| |stj | ||j d| ||sH|j| d|j5} tjj|} | tjj||}tjj|}| tjk7r&| j|| ||j d|tj|D]n\} }}| }| tjj||}tjj|}t|D]i}tjj| |}tjj||} | j|| |X|j d|k|D]}tjj| |}tjj|}tjj!|sbtjj||} | j|| ||j d|q ddd|tjj#| } | S#1swY,xYw) zCreate a zip file from all the files under 'base_dir'. The output zip file will be named 'base_name' + ".zip". Returns the name of the output zip file. rN.ziprSz#creating '%s' and adding '%s' to itw) compressionz adding '%s')zipfilerGrmrcrrdrZipFile ZIP_DEFLATEDnormpathrcurdirrXwalkrelpathsortedisfilerp)rfrgrirjrkr[rZrlrx zip_filenamerpzfrrdirpathdirnames filenames arcdirpathr8rms r( _make_zipfilersmv%L''//),K277>>+6   KK { 3 KK $  9 ( ,  __\3)0)=)=? =BDgg&&x0G#77<<(;ww''1H"))#7+%KK x8020A =,9$ '!#X!FJWW--j9 "8,9D77<<6D ggll:tc|g}t|std|zt|ttfs td|D]1}t|ttfrt |dk7s(td|||ft |<y)auRegisters an archive format. name is the name of the format. function is the callable that will be used to create archives. If provided, extra_args is a sequence of (name, value) tuples that will be passed as arguments to the callable. description can be provided to describe the format, and will be returned by the get_archive_formats() function. NzThe %s object is not callablez!extra_args needs to be a sequencer?z+extra_args elements are : (arg_name, value))callable TypeErrorrjtuplerlenr)r8function extra_args descriptionelements r(rrbs H 7(BCC j5$- 0;<<K'E4=1S\A5EIJ JK' K@Tr'ct|=yrv)rr8s r(rrws r'c htjd|||| t|} ||||d} | d} | dD] \} } | | | < |t j }t| dd}d}|t j|j}tj|sttjd ||rt j|}|| d <n^t j}||j!d |t j"j%|}|st j&| | ||fi| }|)||j!d |t j&||S#t$rt d|zdwxYw#|*||j!d |t j&|wwxYw) aCreate an archive file (eg. zip or tar). 'base_name' is the name of the file to create, minus any format-specific extension; 'format' is the archive format: one of "zip", "tar", "gztar", "bztar", or "xztar". Or any other registered format. 'root_dir' is a directory that will be the root directory of the archive; ie. we typically chdir into 'root_dir' before creating the archive. 'base_dir' is the directory where we start archiving from; ie. 'base_dir' will be the common prefix of all files and directories in the archive. 'root_dir' and 'base_dir' both default to the current directory. Returns the name of the archive file. 'owner' and 'group' are used when creating a tar archive. By default, uses the current owner and group. zshutil.make_archivezunknown archive format '%s'N)rjrkr[rZrsupports_root_dirFzNot a directoryrlzchanging into '%s'zchanging back to '%s')rJrrrBrarGr|rrnrr NotADirectoryErrorr;ENOTDIRrgetcwddebugrmrpchdir)rfrrlrgrirjr[rZrk format_inforrargvalrsave_cwdstmdr9s r(rrzs$II#Y(KK&v. !Fu.F q>DNSs 99&95AHwwx ((||D!$U]]4ExP P  ),I!)F: yy{H! 18< 2I" 86v6  ! 4h? HHX  OQ K6?@dJKF  ! 4h? HHX  s E'0 F'F.F1ctjDcgc]\}}||d|df}}}|j|Scc}}w)zReturns a list of supported formats for unpacking. Each element of the returned sequence is a tuple (name, extensions, description) r)_UNPACK_FORMATSrr)r8rdrs r(rrsL$$&(JD$d1gtAw'(G( LLN N(sAci}tjD]\}}|dD]}|||< |D]}||vsd}t||||fzt|s t dy)z+Checks what gets registered as an unpacker.rz!%s is already registered for "%s"z*The registered function must be a callableN)rrr1rr) extensionsrrexisting_extensionsr8rdext extensionmsgs r(_check_unpack_optionsrs%++-, d7 ,C'+  $ ,, H + +5Cy':9'E'G!GH HH H DEE r'c@|g}t|||||||ft|<y)aMRegisters an unpack format. `name` is the name of the format. `extensions` is a list of extensions corresponding to the format. `function` is the callable that will be used to unpack archives. The callable will receive archives to unpack. If it's unable to handle an archive, it needs to raise a ReadError exception. If provided, `extra_args` is a sequence of (name, value) tuples that will be passed as arguments to the callable. description can be provided to describe the format, and will be returned by the get_unpack_formats() function. N)rr)r8rrrrs r(rrs." *h ;&*kIODr'ct|=y)z*Removes the pack format from the registry.N)rrs r(rrs r'ctjj|}tjj|stj|yy)z1Ensure that the parent directory of `path` existsN)rGrmrcrr)rmrcs r(_ensure_directoryrs5ggood#G 77== ! G "r'cnddl}|j|std|z|j|} |j D]}|j }|j dsd|vr%tjj|g|jd}|sWt||jdrt|j|d5}t|d5}t||dddddd |jy#1swY%xYw#1swYxYw#|jwxYw)z+Unpack zip `filename` to `extract_dir` rNz%s is not a zip file/z..rr)rx is_zipfiler/ryinfolistr9r8rGrmrsplitrr7rr r) r9 extract_dirrxrrdr8 targetpathsourcetargets r(_unpack_zipfilers   h '.9:: //( #CLLN 0D==Ds#tt|kDDJJsODJ j )==%XXdC(0FZ.028/000 0$ 0000 sBBD":D" D D &D. D" D DD D""D4r]cddl} |j|} |j |||j y#|j$rtd|zwxYw#|j wxYw)zAUnpack tar/tar.gz/tar.bz2/tar.xz `filename` to `extract_dir` rNz/%s is not a compressed or uncompressed tar filer])rbrTarErrorr/ extractallr)r9rrrbtarobjs r(_unpack_tarfilersxJh'+f5    J = HJ JJ  s<AAA/rRru)rqrz.tar.gzz.tgzz.tar.bz2z.tbz2z.tar.xzz.txzc~tjD]&\}}|dD]}|j|s|ccS(y)Nr)rrr7)r9r8rdrs r(_find_unpack_formatr9sI%++- da I  +   r'ctjd||||tj}tj|}tj|}|i}nd|i}|( t |}|d}|||fit|d|yt|}|tdj|t |d}tt |d|z}|||fi|y#t $rtdj|dwxYw)a]Unpack an archive. `filename` is the name of the archive. `extract_dir` is the name of the target directory, where the archive is unpacked. If not provided, the current working directory is used. `format` is the archive format: one of "zip", "tar", "gztar", "bztar", or "xztar". Or any other registered format. If not provided, unpack_archive will use the filename extension and see if an unpacker was registered for that extension. In case none is found, a ValueError is raised. If `filter` is given, it is passed to the underlying extraction function. zshutil.unpack_archiveNrzUnknown unpack format '{0}'rr?zUnknown archive format '{0}') rJrrGrrrrBrardictrr/)r9rrr filter_kwargsrrrs r(rr@s"$II%xfEiik ))K(Kyy"H ~ !6*   U)&1K1~ X{Ld;q>&:LmL%X. >:AA(KL Lv&q)of-a01MA X{-f- U:AA&IJPT T Us % C""%Dstatvfs disk_usageusageztotal used freezTotal space in byteszUsed space in byteszFree space in bytesctj|}|j|jz}|j|jz}|j|j z |jz}t |||S)zReturn disk usage statistics about the given path. Returned value is a named tuple with attributes 'total', 'used' and 'free', which are the amount of total, used and free space, in bytes. )rGrf_bavailf_frsizef_blocksf_bfree_ntuple_diskusage)rmrfreetotaluseds r(rrys` ZZ {{R[[( bkk) bjj(BKK7 d33r'cVtj|\}}||z }t|||S)zReturn disk usage statistics about the given path. Returned values is a named tuple with attributes 'total', 'used' and 'free', which are the amount of total, used and free space, in bytes. )r _getdiskusager)rmrrrs r(rrs0 &&t, tt| d33r'cxtjd|||| | td|}|}|d}n7t|tr't |}|t dj||d}n7t|ts't|}|t dj|tj|||y)zChange owner user and group of the given path. user and group can be the uid/gid or the user/group names, and in that case, they are converted to their respective uid/gid. z shutil.chownNzuser and/or group must be setzno such user: {!r}zno such group: {!r}) rJrrarjrrJ LookupErrorrintrDrGr)rmuserrZ_user_groups r(rrs IIndD%0 | 899 E F | D#  =299$?@ @ } s #% >3::5AB BHHT5&!r'c6 ttjd} ttjd}|dks|dkrb tj t jj}|dkr|jxs|d}|dkr|jxs|d}tj||fS#ttf$rd}YwxYw#ttf$rd}YwxYw#tttf$rtj|}YwxYw)aGet the size of the terminal window. For each of the two dimensions, the environment variable, COLUMNS and LINES respectively, is checked. If the variable is defined and the value is a positive integer, it is used. When COLUMNS or LINES is not defined, which is the common case, the terminal connected to sys.__stdout__ is queried by invoking os.get_terminal_size. If the terminal size cannot be successfully queried, either because the system doesn't support querying, or because we are not connected to a terminal, the value given in fallback parameter is used. Fallback defaults to (80, 24) which is the default size used by many terminal emulators. The value returned is a named tuple of type os.terminal_size. COLUMNSrLINESr)rrGenvironrBrar rJ __stdout__r5AttributeErrorr7 terminal_sizecolumnslines)fallbackrrsizes r(r r s (bjj+,BJJw'( !|uz .''(=(=(?@D a<ll1hqkG A:JJ-(1+E  We, --+ j ! j ! G4 .##H-D .s4B>C1C,>CCC)(C),)DDctjj|xr8tj||xr tjj | Srv)rGrmrr0r)rxrs r( _access_checkrsA GGNN2  &299R#6 &GGMM"%%'r'c~|tjz xs(tjtj|S)z On Windows, we can use NeedCurrentDirectoryForExePath to figure out if we should add the cwd to PATH when searching for executables if the mode is executable. )rGX_OKrNeedCurrentDirectoryForExePathr)cmdrs r(_win_path_needs_curdirrs5   "W%K%K C &""r'c8t|t}tjj |\}}|r|g}n|8tj j dd}| tjd}|sy|rHtj|}|j tjtj}n4tj|}|j tj}tjdk(rEt!||r9tj"}|rtj|}|j%d|tjdk(rtj&dxst(}|j tjDcgc]}|s| }}|r"|Dcgc]}tj|}}|g|Dcgc]}||z c}z} tjj+| ddj-|tj.zr8t1fd|Ds$| j3| j5dn|g} t7} |D]p} tjj9| } | | vs'| j;| | D]4} tjj=| | }t?||s0|ccSry#ttf$rtj}YwxYwcc}wcc}wcc}w) a3Given a command, mode, and a PATH string, return the path which conforms to the given mode on the PATH, or None if there is no such file. `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result of os.environ.get("PATH"), or can be overridden with a custom search path. NPATHCS_PATHrrPATHEXTrc3DK|]}|jk(ywrv)upper).0rsuffixs r( zwhich..5s%Of &;%Os ) rjr!rGrmrrgetconfstrrradefpathfsencodepathseprrJr3rr|insertgetenv_WIN_DEFAULT_PATHEXTsplitextrranyrpoprrorerr)rrrm use_bytesrcr|pathext_sourcerpathextfilesseendirnormdirthefiler8rs @r(rrsr3&I 77==%LGSy <::>>&$/D|&::i0D ;;t$D::bkk"**56D;;t$D::bjj)D <<7 "'=c4'HYYFV, KK6 " ||w9-E1E"0"6"6rzz"BJ3c3JJ 3:;Cr{{3';G;w7#)77!!%(+A.446 "''>#%Ow%O"O LL1 & 5D ''""3'$ HHW   ww||C1 t,K   q' 3&::D&6K<7s* K' L (L 4L L'L  L )r)F)FN)rLrrNNNN)rrNNNN)Nr&)NNrrNNN)NN))P)ir+rGrJrnr collectionsr;warningszlibr^rArOr_lzmar`r8rrrr3rrcrlr8rNrr__all__r7rr!rrr/r6r1r3rDrUrar rtryr}r r rr r rrrr stat_resultrrrrrrsupports_dir_fdr supports_fdrr ravoids_symlink_attacksr*rr.r/rDrJrsrrrrrrrrrrrrrrrrrr namedtuplerrrrrrr rrF_OKrrr&r'r(rs<    O N O 77d? 77g  <<7G&{I 2z*Os||/F/Fw/O775,7?  G @E@;w;6600&I&   (>@.:(4$ER+/>@+/.2 2{040 +/HT'+$(,&P 7<@D!&d%&+5.2` 2>>/0$!#H>0@ggrww 288<''(<ZZ2>>1<WW ; ;; `+T$`+H!2.$"'@DG $$LM@DDL;<@D7r#' "&  m01%' !.1E0F 2!4W,b*=U!.1F0G 3!5W!.1C0D 0!2WA*KL;?=@ F$CG')J, <6: (h-D EhZ 8 !*F 3_b 2 4OG!+W 5 3 5OG!*F 3_b 0 2OG..d..b 2y NN< . ..w8IJ&<#%:"%:" 4 NN< . ..w8IJ4"@+.b' "GGbgg%DPE/ONOs3NNNN  N NNN('N(