B ‚Ž\]”ã @sšdZddlZddlZddddddd d d d d g Zdd„Zdd „Zdd „Zdd„Zdd„Zdd„Z dd„Z dd„Z dd „Z dd „Z dd „Zdd„Zdd„ZdS)z˜ Path operations common to more than one OS Do not use directly. The OS specific modules import the appropriate functions from this module themselves. éNÚ commonprefixÚexistsÚgetatimeÚgetctimeÚgetmtimeÚgetsizeÚisdirÚisfileÚsamefileÚ sameopenfileÚsamestatcCs(yt |¡Wntk r"dSXdS)zDTest whether a path exists. Returns False for broken symbolic linksFT)ÚosÚstatÚOSError)Úpath©rú'/usr/local/lib/python3.7/genericpath.pyrs cCs0yt |¡}Wntk r"dSXt |j¡S)z%Test whether a path is a regular fileF)r rrÚS_ISREGÚst_mode)rÚstrrrr s cCs0yt |¡}Wntk r"dSXt |j¡S)zW||dd…fS)z¤Split the extension from a pathname. Extension is everything from the last dot to the end, ignoring leading dots. Returns "(root, ext)"; ext may be empty.éNr)Úrfindr$)ÚpÚsepÚaltsepÚextsepZsepIndexZ altsepIndexZdotIndexZ filenameIndexrrrÚ _splitextus      r4cGsbd}}xB|D]:}t|tƒr"d}qt|tƒr2d}qtd||jjfƒd‚qW|r^|r^tdƒd‚dS)NFTz*%s() argument must be str or bytes, not %rz.Can't mix strings and bytes in path components)rÚstrÚbytesÚ TypeErrorÚ __class__Ú__name__)ZfuncnameÚargsZhasstrZhasbytesrrrrÚ_check_arg_typesŒs   r;)Ú__doc__r rÚ__all__rr rrrrrrr r r r4r;rrrrÚs$