VcocspdZddlZddlZgdZdZdZdZdZdZd Z d Z d Z d Z d Z dZdZdZdS)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) commonprefixexistsgetatimegetctimegetmtimegetsizeisdirisfilesamefile sameopenfilesamestatcsb tj|n#ttf$rYdSwxYwdS)zDTest whether a path exists. Returns False for broken symbolic linksFT)osstatOSError ValueError)path $/usr/lib64/python3.11/genericpath.pyrrsB  Z uu 4 ,,c tj|}n#ttf$rYdSwxYwtj|jS)z%Test whether a path is a regular fileF)r r rrZS_ISREGst_mode)rst rrrsO WT]] Z uu < # ##rcr)z||}|r%||}t||}||}||kr;|dz}||kr0|||dz|kr|d|||dfS|dz }||k0||ddfS)zSplit 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.iNr)Zrfindr)ZpZsepZaltsepZextsepZsepIndexZ altsepIndexZdotIndexZ filenameIndexs r _splitextr$yswws||H .ggfoo x--wwvH( 1 h& }Q./69 2(|Qxyy\11 Q Mh&  ae8Orcsdx}}|D]P}t|trd}t|trd}2t|d|jjd|r|rtdddSdS)NFTz;() argument must be str, bytes, or os.PathLike object, not z.Can't mix strings and bytes in path components)rZstrZbytesZ TypeErrorZ __class__Z__name__)ZfuncnameZargsZhasstrZhasbytesrr!r_check_arg_typesr%sFX [[ a   [FF 5 ! ! [HHxPP78{7KPPQQVZ [ T(THIItSTTTTr)Z__doc__r r Z__all__rrrrrrrrr r r r$r%)rrr&s     $$$$$$%%% &&& &&& &&& $$$$. T T T T Tr