ok

Mini Shell

Direktori : /proc/self/root/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/
Upload File :
Current File : //proc/self/root/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/filesystem.pyo

�
Bu�_c@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((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/filesystem.pytfiles(t__name__t
__module__tpropertyR(((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/filesystem.pyR
scCs�tjdksttd�r#tSd}x�||kr�tjj|�r�tj�dkr�yt	|�}Wnt
k
r�tSX|dkStj|tj
�Sq,|tjj|�}}q,WtS(Ntwin32tgeteuidi(tsystplatformthasattrtostTruetNonetpathtlexistsRRtOSErrortFalsetaccesstW_OKtdirname(Rtprevioustpath_uid((sO/opt/alt/python36/lib/python3.6/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((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/filesystem.pytcopy2_fixed;s
cCstjtj|�j�S(N(tstattS_ISSOCKRtlstattst_mode(R((sO/opt/alt/python36/lib/python3.6/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(RRRRR!tbasenameRRtflushtfsynctfileno(RtkwargsR.tresult((sO/opt/alt/python36/lib/python3.6/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-((sO/opt/alt/python36/lib/python3.6/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!tnameRR t_test_writable_dir_win(Rtparent((sO/opt/alt/python36/lib/python3.6/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(sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/filesystem.pys	<genexpr>�sis3Unexpected condition testing for writable directory(trangetjoinRRtopentO_RDWRtO_CREATtO_EXCLRterrnotEEXISTtEPERMtEACCESRtclosetunlinkRtEnvironmentError(RR9RQRGRtfdte((RRsO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/filesystem.pyRH�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(RRRT(RPR.(troot(sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/filesystem.pys	<genexpr>�s(Rtwalktfnmatchtfiltertextend(RtpatternR>RQtfilestmatches((RbsO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/filesystem.pyt
find_files�s
!cCs&tjj|�rdStjj|�S(Ni(RRtislinktgetsize(R((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/filesystem.pyt	file_size�scCstt|��S(N(RRm(R((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/filesystem.pytformat_file_size�scCscd}xVtj|�D]E\}}}x3|D]+}tjj||�}|t|�7}q,WqW|S(Ng(RRcRRTRm(RtsizeRbt_dirsRhtfilenamet	file_path((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/filesystem.pytdirectory_size�s
cCstt|��S(N(RRs(R((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/filesystem.pytformat_directory_size�s(+RYRdRtos.pathRNR%R1Rt
contextlibRttempfileRtpip._vendor.retryingRtpip._vendor.sixRtpip._internal.utils.compatRtpip._internal.utils.miscRtpip._internal.utils.typingRRttypingRR	R
RRR
R$R0R(R?t_replace_retryRDRJRHRjRmRnRsRt(((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/filesystem.pyt<module>s@(			
		$				

Zerion Mini Shell 1.0