;ò
ñŒü?c           @   s–   d  Z  d k Z e i d e ƒ [ d k Z d k Td d d d d d	 d
 g Z h  Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d „  Z d „  Z d S(   sy   Maintain a cache of stat() information on files.

There are functions to reset the cache or to selectively remove items.
Ns9   The statcache module is obsolete.  Use os.stat() instead.(   s   *s   stats   resets   forgets   forget_prefixs
   forget_dirs   forget_except_prefixs   isdirc         C   sB   t  i |  t ƒ } | t j o t i |  ƒ t  |  <} n | Sd S(   s'   Stat a file, possibly out of the cache.N(   s   caches   gets   paths   Nones   rets   _oss   stat(   s   paths   ret(    (    s&   /mit/python/lib/python2.3/statcache.pys   stat   s
     c           C   s   t  i ƒ  d S(   s   Clear the cache.N(   s   caches   clear(    (    (    s&   /mit/python/lib/python2.3/statcache.pys   reset   s     c         C   s%   y t  |  =Wn t j
 o n Xd S(   s1   Remove a given item from the cache, if it exists.N(   s   caches   paths   KeyError(   s   path(    (    s&   /mit/python/lib/python2.3/statcache.pys   forget$   s
     c         C   s9   x2 t  i ƒ  D]$ } | i |  ƒ o t | ƒ q q Wd S(   s)   Remove all pathnames with a given prefix.N(   s   caches   keyss   paths
   startswiths   prefixs   forget(   s   prefixs   path(    (    s&   /mit/python/lib/python2.3/statcache.pys   forget_prefix+   s
      c         C   s†   d k  l } l } | | |  d ƒ ƒ d }  t |  ƒ xI t i ƒ  D]; } | i |  ƒ o | | ƒ d |  j o t | ƒ qC qC Wd S(   sA   Forget a directory and all entries except for entries in subdirs.(   s   splits   joins   xxxi    N(	   s   os.paths   splits   joins   prefixs   forgets   caches   keyss   paths
   startswith(   s   prefixs   joins   splits   path(    (    s&   /mit/python/lib/python2.3/statcache.pys
   forget_dir1   s     
 'c         C   s:   x3 t  i ƒ  D]% } | i |  ƒ o t | ƒ q q Wd S(   sk   Remove all pathnames except with a given prefix.

    Normally used with prefix = '/' after a chdir().
    N(   s   caches   keyss   paths
   startswiths   prefixs   forget(   s   prefixs   path(    (    s&   /mit/python/lib/python2.3/statcache.pys   forget_except_prefixB   s
      c         C   s>   y t  |  ƒ } Wn t i j
 o t Sn Xt | i ƒ Sd S(   s%   Return True if directory, else False.N(   s   stats   paths   sts   _oss   errors   Falses   S_ISDIRs   st_mode(   s   paths   st(    (    s&   /mit/python/lib/python2.3/statcache.pys   isdirL   s     	(   s   __doc__s   warningss   warns   DeprecationWarnings   oss   _oss   stats   __all__s   caches   resets   forgets   forget_prefixs
   forget_dirs   forget_except_prefixs   isdir(   s   resets   forget_except_prefixs   stats   _oss   __all__s   warningss
   forget_dirs   caches   forget_prefixs   isdirs   forget(    (    s&   /mit/python/lib/python2.3/statcache.pys   ?   s   									
