VcopdZddlZddlZgdZdZdZdZdZdZd 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 sameopenfilesamestatcb tj|n#ttf$rYdSwxYwdS)zDTest whether a path exists. Returns False for broken symbolic linksFT)osstatOSError ValueError)paths $/usr/lib64/python3.11/genericpath.pyrrsB  Z uu 4 ,,c tj|}n#ttf$rYdSwxYwtj|jS)z%Test whether a path is a regular fileF)rrrrS_ISREGst_mode)rsts rr r sO WT]] Z uu < # ##rc tj|}n#ttf$rYdSwxYwtj|jS)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.Nr)rfindr1)psepaltsepextsepsepIndex altsepIndexdotIndex filenameIndexs r _splitextrMyswws||H .ggfoo x--wwvH( 1 h& }Q./69 2(|Qxyy\11 Q Mh&  ae8Or!cdx}}|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)r+strbytes TypeError __class____name__)funcnameargshasstrhasbytesrs r_check_arg_typesrXsFX [[ a   [FF 5 ! ! [HHxPP78{7KPPQQVZ [ T(THIItSTTTTr!)__doc__rr__all__rr r rrrrrr r r rMrXr!rr\s     $$$$$$%%% &&& &&& &&& $$$$. T T T T Tr!