Hacked By AnonymousFox

Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pyc

�
�Rec@s�ddlZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZddlmZddlmZmZerdd	lmZmZmZmZmZd
efd��YZnd�Zd
�Zd�Z e	d��Z!e
dddd�Z"erte"d��Z#ne"ej#�Z#d�Z$d�Z%d�Z&d�Z'd�Z(d�Z)d�Z*dS(i����N(tcontextmanager(tNamedTemporaryFile(tretry(tPY2(tget_path_uid(tformat_size(tMYPY_CHECK_RUNNINGtcast(tAnytBinaryIOtIteratortListtUniontNamedTemporaryFileResultcBseZed��ZRS(cCsdS(N((tself((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pytfiles(t__name__t
__module__tpropertyR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pyR
scCs�tjdksttd�r#tStjj|�s;t�d}x�||kr�tjj	|�r�tj
�dkr�yt|�}Wntk
r�t
SX|dkStj|tj�SqD|tjj|�}}qDWt
S(Ntwin32tgeteuidi(tsystplatformthasattrtostTruetpathtisabstAssertionErrortNonetlexistsRRtOSErrortFalsetaccesstW_OKtdirname(Rtprevioustpath_uid((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pytcheck_path_owners

cCs�ytj||�Wnyttfk
r�x\||gD]N}yt|�}Wntk
r`q7X|r7tjdjt����q7q7W�nXdS(s�Wrap shutil.copy2() but map errors copying socket files to
    SpecialFileError as expected.

    See also https://bugs.python.org/issue37700.
    s`{f}` is a socketN(tshutiltcopy2RtIOErrort	is_sockettSpecialFileErrortformattlocals(tsrctdesttftis_socket_file((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pytcopy2_fixed;s
cCstjtj|�j�S(N(tstattS_ISSOCKRtlstattst_mode(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pyR*Tsc
ks�tdtdtjj|�dtjj|�dd|��F}td|�}z	|VWd|jj�tj	|jj
��XWdQXdS(s%Return a file-like object pointing to a tmp file next to path.

    The file is created securely and is ensured to be written to disk
    after the context reaches its end.

    kwargs will be passed to tempfile.NamedTemporaryFile to control
    the way the temporary file will be opened.
    tdeletetdirtprefixtsuffixs.tmpR
N(RR RRR#tbasenameRRtflushtfsynctfileno(RtkwargsR0tresult((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pytadjacent_tmp_fileYs		
tstop_max_delayi�t
wait_fixedi�cCsIytj||�Wn.tk
rDtj|�tj||�nXdS(N(RtrenameRtremove(R.R/((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pytreplacevs


cCsmx>tjj|�s@tjj|�}||kr7Pn|}qWtjdkrctj|tj�St|�S(sgCheck if a directory is writable.

    Uses os.access() on POSIX, tries creating files on Windows.
    tposix(RRtisdirR#tnameR!R"t_test_writable_dir_win(Rtparent((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pyttest_writable_dir�s
csd}d�x�td�D]�}|dj�fd�td�D��}tjj||�}y'tj|tjtjBtjB�}WnVtk
r�}|j	t	j
kr�qn|j	t	jks�|j	t	jkr�t
S�qXtj|�tj|�tSqWtd��dS(Nt(accesstest_deleteme_fishfingers_custard_t$abcdefghijklmnopqrstuvwxyz0123456789i
tc3s|]}tj��VqdS(N(trandomtchoice(t.0t_(talphabet(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pys	<genexpr>�sis3Unexpected condition testing for writable directory(trangetjoinRRtopentO_RDWRtO_CREATtO_EXCLRterrnotEEXISTtEPERMtEACCESR tclosetunlinkRtEnvironmentError(RR;RSRIRtfdte((RTs�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pyRJ�s$)'$

cs\g}xOtj|�D]>\�}}tj||�}|j�fd�|D��qW|S(s�Returns a list of absolute paths of files beneath path, recursively,
    with filenames which match the UNIX-style shell glob pattern.c3s$|]}tjj�|�VqdS(N(RRRV(RRR0(troot(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pys	<genexpr>�s(Rtwalktfnmatchtfiltertextend(RtpatternR@RStfilestmatches((Rds�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pyt
find_files�s
!cCs&tjj|�rdStjj|�S(Ni(RRtislinktgetsize(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pyt	file_size�scCstt|��S(N(RRo(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pytformat_file_size�scCscd}xVtj|�D]E\}}}x3|D]+}tjj||�}|t|�7}q,WqW|S(Ng(RReRRVRo(RtsizeRdt_dirsRjtfilenamet	file_path((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pytdirectory_size�s
cCstt|��S(N(RRu(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pytformat_directory_size�s(+R[RfRtos.pathRPR'R3Rt
contextlibRttempfileRtpip._vendor.retryingRtpip._vendor.sixRtpip._internal.utils.compatRtpip._internal.utils.miscRtpip._internal.utils.typingRRttypingRR	R
RRR
R&R2R*RAt_replace_retryRFRLRJRlRoRpRuRv(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/filesystem.pyt<module>s@(			
		$				

Hacked By AnonymousFox1.0, Coded By AnonymousFox