ó
5Þ	Pc           @   s‘   d  Z  d d l Z d d l Z d d d d d d d	 d
 g Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d S(   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   commonprefixt   existst   getatimet   getctimet   getmtimet   getsizet   isdirt   isfilec         C   s-   y t  j |  ƒ Wn t  j k
 r( t SXt S(   sD   Test whether a path exists.  Returns False for broken symbolic links(   t   ost   statt   errort   Falset   True(   t   path(    (    s!   /usr/lib/python2.7/genericpath.pyR      s
    c         C   s;   y t  j |  ƒ } Wn t  j k
 r* t SXt j | j ƒ S(   s%   Test whether a path is a regular file(   R   R	   R
   R   t   S_ISREGt   st_mode(   R   t   st(    (    s!   /usr/lib/python2.7/genericpath.pyR      s
    c         C   s;   y t  j |  ƒ } Wn t  j k
 r* t SXt j | j ƒ S(   s<   Return true if the pathname refers to an existing directory.(   R   R	   R
   R   t   S_ISDIRR   (   t   sR   (    (    s!   /usr/lib/python2.7/genericpath.pyR   &   s
    c         C   s   t  j |  ƒ j S(   s1   Return the size of a file, reported by os.stat().(   R   R	   t   st_size(   t   filename(    (    s!   /usr/lib/python2.7/genericpath.pyR   /   s    c         C   s   t  j |  ƒ j S(   sC   Return the last modification time of a file, reported by os.stat().(   R   R	   t   st_mtime(   R   (    (    s!   /usr/lib/python2.7/genericpath.pyR   4   s    c         C   s   t  j |  ƒ j S(   s=   Return the last access time of a file, reported by os.stat().(   R   R	   t   st_atime(   R   (    (    s!   /usr/lib/python2.7/genericpath.pyR   9   s    c         C   s   t  j |  ƒ j S(   sA   Return the metadata change time of a file, reported by os.stat().(   R   R	   t   st_ctime(   R   (    (    s!   /usr/lib/python2.7/genericpath.pyR   >   s    c         C   s[   |  s
 d St  |  ƒ } t |  ƒ } x2 t | ƒ D]$ \ } } | | | k r/ | |  Sq/ W| S(   sG   Given a list of pathnames, returns the longest common leading componentt    (   t   mint   maxt	   enumerate(   t   mt   s1t   s2t   it   c(    (    s!   /usr/lib/python2.7/genericpath.pyR    D   s     c         C   s§   |  j  | ƒ } | r6 |  j  | ƒ } t | | ƒ } n  |  j  | ƒ } | | k r | d } x? | | k  r™ |  | | k rŒ |  |  |  | f S| d 7} q^ Wn  |  d f S(   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.i   R   (   t   rfindR   (   t   pt   sept   altsept   extsept   sepIndext   altsepIndext   dotIndext   filenameIndex(    (    s!   /usr/lib/python2.7/genericpath.pyt	   _splitextU   s    
(   t   __doc__R   R	   t   __all__R   R   R   R   R   R   R   R    R*   (    (    (    s!   /usr/lib/python2.7/genericpath.pyt   <module>   s   									