3 \”ã @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Úsamestatc Cs(ytj|ƒWntk r"dSXdS)zDTest whether a path exists. Returns False for broken symbolic linksFT)ÚosÚstatÚOSError)Úpath©rú#/usr/lib64/python3.6/genericpath.pyrs c Cs0ytj|ƒ}Wntk r"dSXtj|jƒS)z%Test whether a path is a regular fileF)r rrÚS_ISREGÚst_mode)rÚstrrrr s c Cs0ytj|ƒ}Wntk r"dSXtj|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ÚextsepÚsepIndexÚ altsepIndexÚdotIndexÚ filenameIndexrrrÚ _splitextus      r<cGsbd}}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__)ÚfuncnameÚargsÚhasstrÚhasbytesrrrrÚ_check_arg_typesŒs   rF)Ú__doc__r rÚ__all__rr rrrrrrr r r r<rFrrrrÚs$