Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/sys/lib/python2.7/genericpath.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�`^c@s�dZddlZddlZddddddd	d
gZd�Zd�Zd
�Zd�Zd�Zd�Z	d�Z
d�Zd�ZdS(s�
Path operations common to more than one OS
Do not use directly.  The OS specific modules import the appropriate
functions from this module themselves.
i�NtcommonprefixtexiststgetatimetgetctimetgetmtimetgetsizetisdirtisfilecCs-ytj|�Wntjk
r(tSXtS(sDTest whether a path exists.  Returns False for broken symbolic links(toststatterrortFalsetTrue(tpath((s!/sys/lib/python2.7/genericpath.pyRs
cCs;ytj|�}Wntjk
r*tSXtj|j�S(s%Test whether a path is a regular file(RR	R
RtS_ISREGtst_mode(R
tst((s!/sys/lib/python2.7/genericpath.pyRs
cCs;ytj|�}Wntjk
r*tSXtj|j�S(s<Return true if the pathname refers to an existing directory.(RR	R
RtS_ISDIRR(tsR((s!/sys/lib/python2.7/genericpath.pyR&s
cCstj|�jS(s1Return the size of a file, reported by os.stat().(RR	tst_size(tfilename((s!/sys/lib/python2.7/genericpath.pyR/scCstj|�jS(sCReturn the last modification time of a file, reported by os.stat().(RR	tst_mtime(R((s!/sys/lib/python2.7/genericpath.pyR4scCstj|�jS(s=Return the last access time of a file, reported by os.stat().(RR	tst_atime(R((s!/sys/lib/python2.7/genericpath.pyR9scCstj|�jS(sAReturn the metadata change time of a file, reported by os.stat().(RR	tst_ctime(R((s!/sys/lib/python2.7/genericpath.pyR>scCs[|s
dSt|�}t|�}x2t|�D]$\}}|||kr/|| Sq/W|S(sGGiven a list of pathnames, returns the longest common leading componentt(tmintmaxt	enumerate(tmts1ts2titc((s!/sys/lib/python2.7/genericpath.pyRDscCs�|j|�}|r6|j|�}t||�}n|j|�}||kr�|d}x?||kr�|||kr�|| ||fS|d7}q^Wn|dfS(s�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.iR(trfindR(tptseptaltseptextseptsepIndextaltsepIndextdotIndext
filenameIndex((s!/sys/lib/python2.7/genericpath.pyt	_splitextUs
(
t__doc__RR	t__all__RRRRRRRRR*(((s!/sys/lib/python2.7/genericpath.pyt<module>s									

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].