Viewing File: /opt/alt/python35/lib64/python3.5/__pycache__/genericpath.cpython-35.pyc



°ÕYfã@sådZddlZddlZddddddd	d
ddd
gZdd„Zdd
„Zdd	„Zdd„Zdd„Zdd„Z	dd„Z
dd„Zdd
„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.ytj|ƒWntk
r)dSYnXdS)zDTest whether a path exists.  Returns False for broken symbolic linksFT)ÚosÚstatÚOSError)Úpath©rú0/opt/alt/python35/lib64/python3.5/genericpath.pyrs

	cCs<ytj|ƒ}Wntk
r+dSYnXtj|jƒS)z%Test whether a path is a regular fileF)r
rrÚS_ISREGÚst_mode)rÚstrrrr	s

	cCs<ytj|ƒ}Wntk
r+dSYnXtj|jƒS)z<Return true if the pathname refers to an existing directory.F)r
rrÚS_ISDIRr)Úsrrrrr's

	cCstj|ƒjS)z1Return the size of a file, reported by os.stat().)r
rÚst_size)Úfilenamerrrr0scCstj|ƒjS)zCReturn the last modification time of a file, reported by os.stat().)r
rÚst_mtime)rrrrr5scCstj|ƒjS)z=Return the last access time of a file, reported by os.stat().)r
rÚst_atime)rrrrr:scCstj|ƒjS)zAReturn the metadata change time of a file, reported by os.stat().)r
rÚst_ctime)rrrrr?scCsa|s
dSt|ƒ}t|ƒ}x8t|ƒD]*\}}|||kr/|d|…Sq/W|S)zGGiven a list of pathnames, returns the longest common leading componentÚN)ÚminÚmaxÚ	enumerate)ÚmÚs1Ús2ÚiÚcrrrrEscCs"|j|jko!|j|jkS)z5Test whether two stat buffers reference the same file)Úst_inoÚst_dev)r"r#rrrrQscCs+tj|ƒ}tj|ƒ}t||ƒS)z9Test whether two pathnames reference the same actual file)r
rr)Úf1Úf2r"r#rrrr
XscCs+tj|ƒ}tj|ƒ}t||ƒS)z:Test whether two open file objects reference the same file)r
Úfstatr)Úfp1Úfp2r"r#rrrrascCsÁ|j|ƒ}|r3|j|ƒ}t||ƒ}|j|ƒ}||kr­|d}xR||kr¬|||d…|krŸ|d|…||d…fS|d7}q[W||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Ú	_splitextos
r7cGs‰d}}x]|D]U}t|tƒr/d}qt|tƒrGd}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)Ú
isinstanceÚstrÚbytesÚ	TypeErrorÚ	__class__Ú__name__)ÚfuncnameÚargsÚhasstrÚhasbytesrrrrÚ_check_arg_types†s

		rB)Ú__doc__r
rÚ__all__rr	rrrrrrrr
rr7rBrrrrÚ<module>s$			
Back to Directory File Manager