Viewing File: /usr/lib64/python3.6/__pycache__/genericpath.cpython-36.opt-1.pyc

3

sj@sdZddlZddlZddddddd	d
ddd
dgZddZdd
Zdd	ZddZddZddZ	ddZ
ddZdd
ZddZ
ddZddZddZejGdddZdS)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sameopenfilesamestat
ALLOW_MISSINGcCs(ytj|Wntk
r"dSXdS)zDTest whether a path exists.  Returns False for broken symbolic linksFT)osstatOSError)pathr#/usr/lib64/python3.6/genericpath.pyrs
cCs0ytj|}Wntk
r"dSXtj|jS)z%Test whether a path is a regular fileF)rrrS_ISREGst_mode)rstrrrr	s
cCs0ytj|}Wntk
r"dSXtj|jS)z<Return true if the pathname refers to an existing directory.F)rrrS_ISDIRr)srrrrr's
cCstj|jS)z1Return the size of a file, reported by os.stat().)rrst_size)filenamerrrr0scCstj|jS)zCReturn the last modification time of a file, reported by os.stat().)rrst_mtime)rrrrr5scCstj|jS)z=Return the last access time of a file, reported by os.stat().)rrst_atime)rrrrr:scCstj|jS)zAReturn the metadata change time of a file, reported by os.stat().)rrst_ctime)rrrrr?scCsl|sdSt|dttfs*tttj|}t|}t|}x,t|D] \}}|||krD|d|SqDW|S)zGGiven a list of pathnames, returns the longest common leading componentrN)	
isinstancelisttuplemaprfspathminmax	enumerate)ms1s2icrrrrEscCs|j|jko|j|jkS)z5Test whether two stat buffers reference the same file)st_inost_dev)r(r)rrrrWscCstj|}tj|}t||S)z9Test whether two pathnames reference the same actual file)rrr)f1f2r(r)rrrr
^s

cCstj|}tj|}t||S)z:Test whether two open file objects reference the same file)rfstatr)fp1fp2r(r)rrrrgs

cCs|j|}|r"|j|}t||}|j|}||kr~|d}x@||kr||||d|krr|d|||dfS|d7}q>W||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)rfindr%)psepaltsepextsepsepIndexaltsepIndexdotIndex
filenameIndexrrr	_splitextus




r=cGsbd}}xB|D]:}t|tr"d}qt|tr2d}qtd||jjfdqW|r^|r^tdddS)NFTz*%s() argument must be str or bytes, not %rz.Can't mix strings and bytes in path components)rstrbytes	TypeError	__class____name__)funcnameargshasstrhasbytesrrrr_check_arg_typess


rGc@s eZdZdZddZddZdS)r
z$Special value for use in realpath().cCsdS)Nzos.path.ALLOW_MISSINGr)selfrrr__repr__szALLOW_MISSING.__repr__cCs|jjS)N)rArB)rHrrr
__reduce__szALLOW_MISSING.__reduce__N)rB
__module____qualname____doc__rIrJrrrrr
s)rMrr__all__rr	rrrrrrrr
rr=rGobject__new__r
rrrr<module>s&

		
Back to Directory File Manager