HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyo
�
1�3\c@@s�ddlmZddlZddlZddlZddlZddlZddlm	Z	m
Z
d�Zedd�Ze
js�eZdZejZe
jjd�r�ejZejZejZneZeZejZd	ejfd
��YZdejfd��YZd
ejfd��YZej ej!j"d�de#�Z$e%e$dd�Z&e&r�e%edej'�e&_(ejej)e�ejfe&_*n	d�Z&d�Z+d�Z,n�ddl-Z-ej.j/Z0ej1Z2ej3Z4Z5ej6Z7e7d�j8Z9dZ:dZ;dZ<dZ=dZ>dZ?dZ@dZAdZBdZCdZDdZEdZFdZGe4e2e2ej6e2e2e7ge0jH_*e7e0jH_(d�ZId eJfd!��YZdS("i(tabsolute_importNi(tencodingtpycompatcC@s�tj|�rtjStj|�r,tjStj|�rBtjStj|�rXtjStj	|�rntj
Stj|�r�tjStj
|�r�tjS|S(N(tstatmodtS_ISREGtS_IFREGtS_ISDIRtS_IFDIRtS_ISLNKtS_IFLNKtS_ISBLKtS_IFBLKtS_ISCHRtS_IFCHRtS_ISFIFOtS_IFIFOtS_ISSOCKtS_IFSOCK(tmode((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt
_mode_to_kindscC@s�g}|}|jtj�s.|tj7}ntj|�}|j�x�|D]}tj||�}||kr�tj|j	�r�gS|r�|j
|t|j	�|f�qN|j
|t|j	�f�qNW|S(slistdir(path, stat=False) -> list_of_tuples

    Return a sorted list containing information about the entries
    in the directory.

    If stat is True, each element is a 3-tuple:

      (name, type, stat object)

    Otherwise, each element is a 2-tuple:

      (name, type)
    (tendswithRtosseptostlistdirtsorttlstatRRtst_modetappendR(tpathtstattskiptresulttprefixtnamestfntst((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyR&s

" itlinuxt_ioveccB@s&eZdejfdejfgZRS(uiov_baseuiov_len(t__name__t
__module__tctypestc_void_ptc_size_tt_fields_(((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyR%Ust_msghdrcB@s_eZdejfdefdeje�fdefdejfdefdej	fgZ
RS(umsg_nameumsg_namelenumsg_iovu
msg_iovlenumsg_controlumsg_controllenu	msg_flags(R&R'R(R)t
_socklen_ttPOINTERR%t
_msg_iovlen_tt_msg_controllen_ttc_intR+(((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyR,[s			t_cmsghdrcB@s?eZdefdejfdejfdejdfgZRS(ucmsg_lenu
cmsg_levelu	cmsg_typeu	cmsg_datai(R&R't_cmsg_len_tR(R1tc_ubyteR+(((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyR2fs	uct	use_errnotrecvmsgt	c_ssize_tcC@std��dS(Nsunsupported platform(tNotImplementedError(tsockfdtmsgtflags((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt_recvmsgvscC@sA|jtjt�krdStj|jtjt��}|jS(N(tmsg_controllenR(tsizeofR2tcasttmsg_controlR.tcontents(tmsghtcmsgptr((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt_CMSG_FIRSTHDRyscC@svtjd�}ttj|tj�tj|��}tjd�}tddtj	|�dtj|tj�tj|�d�}t
|tj|�d�}|dkr�tj�}t
|tj|���nt|�}|s�gS|jtjks
|jtkrgStj|jtjtj��}|jtjjtjtj�}	gtj|	�D]}
||
^qbS(s+receive list of file descriptors via socketiiiN(R(R4R%R?R)R>tcreate_string_bufferR,tNonetpointerR<tbyreft	get_errnotOSErrorRtstrerrorRDt
cmsg_leveltsockett
SOL_SOCKETt	cmsg_typet_SCM_RIGHTSt	cmsg_dataR.R1tcmsg_lenR2toffsetRtxrange(R9tdummytiovtcbufRBtrtetcmsgtrfdst	rfdscountti((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pytrecvfds�s*'		!i����iiI�i@i�ii@i�cC@s8tj�}t|jdtj|�|jf��dS(Ns%s: %s(R(tWinErrortIOErrorterrnoRtstrfromlocalRK(tnameterr((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt
_raiseioerror�st	posixfilecB@sJeZdZddd�Zd�Zd�Zd�Zd�Zd�ZRS(	ska file object aiming for POSIX-like semantics

        CPython's open() returns a file that was opened *without* setting the
        _FILE_SHARE_DELETE flag, which causes rename and unlink to abort.
        This even happens if any hardlinked copy of the file is in open state.
        We set _FILE_SHARE_DELETE here, so files opened with posixfile can be
        renamed and deleted while they are held open.
        Note that if a file opened with posixfile is unlinked, the file
        remains but cannot be opened again or be recreated under the same name,
        until all reading processes have closed the file.RXi����cC@s�d|krt}nt}|dd!}|dkrSd|krS|tO}t}n|tO}ttB}|dkr|t}nM|dkr�t}n8|dkr�t}|t	O}nt
dtj|���t
j||ttBtBd|td�}|tkrt|�ntj||�}	|	d	krCt
j|�t|�ntj|	tj|�|�}
tj|d
|�tj|d|
�dS(NtbiiRXt+twtasinvalid mode: %si����Rct_file(t	_O_BINARYt_O_TEXTt	_O_RDONLYt
_GENERIC_READt_O_RDWRt_GENERIC_WRITEt_OPEN_EXISTINGt_CREATE_ALWAYSt_OPEN_ALWAYSt	_O_APPENDt
ValueErrorRtsysstrt	_kernel32tCreateFileAt_FILE_SHARE_READt_FILE_SHARE_WRITEt_FILE_SHARE_DELETERFt_FILE_ATTRIBUTE_NORMALt_INVALID_HANDLE_VALUERetmsvcrttopen_osfhandletCloseHandleRtfdopentobjectt__setattr__(tselfRcRtbufsizeR;tm0taccesstcreationtfhtfdtf((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt__init__�s:	

	

		



cC@s|jS(N(Rk(R�((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt__iter__scC@st|j|�S(N(tgetattrRk(R�Rc((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt__getattr__scC@s|jj||�S(s�mimics the read-only attributes of Python file objects
            by raising 'TypeError: readonly attribute' if someone tries:
              f = posixfile('foo.txt')
              f.name = 'bla'  (RkR�(R�Rctvalue((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyR�scC@s|jj�|S(N(Rkt	__enter__(R�((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyR�
s
cC@s|jj|||�S(N(Rkt__exit__(R�texc_typet	exc_valuetexc_tb((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyR�s(	R&R't__doc__R�R�R�R�R�R�(((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyRf�s
,				(Kt
__future__RR(tctypes.utilRRMRRtRRRtFalseRFRt	iswindowstopenRfRPtc_uintR-tsysplatformt
startswithR*R3R0R/R1t	StructureR%R,R2tCDLLtutiltfind_librarytTruet_libcR�R<tc_longtrestypeR.targtypesRDR^Rtwindlltkernel32Rxtc_ulongt_DWORDtc_char_pt_LPCSTRt_LPSTRR)t_HANDLER�R~RzR{R|RsRrRtRoRqR}RnRpRuRmRlRyReR�(((s;/usr/lib64/python2.7/site-packages/mercurial/pure/osutil.pyt<module>sp						!