-í
įķ<c       sĄ     d  Z    d k Z  d k T	 d d d d d d d	 g Z  h  Z  d
   Z  d   Z  d   Z & d   Z , d   Z	 = d   Z
 G 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.
N(   s   *s   stats   resets   forgets   forget_prefixs
   forget_dirs   forget_except_prefixs   isdirc    sT      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   /usr/lib/python2.2/statcache.pys   stat s
   c      s      t  i   d S(   s   Clear the cache.N(   s   caches   clear(    (    (    s   /usr/lib/python2.2/statcache.pys   reset s   c    s7      ! 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   /usr/lib/python2.2/statcache.pys   forget s
   c    sK   & ' ( x; t  i   D( ]* } ) | i |   o * t |  n q Wd S(   s)   Remove all pathnames with a given prefix.N(   s   caches   keyss   paths
   startswiths   prefixs   forget(   s   prefixs   path(    (    s   /usr/lib/python2.2/statcache.pys   forget_prefix& s
    	c    sĄ   , - 4 d k  l } l } 5 | | |  d   d }  6 t |   7 xR t i   D7 ]A } : | i |   o | |  d |  j o ; t |  n qU 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   /usr/lib/python2.2/statcache.pys
   forget_dir, s    	*c    sL   = A C x< t  i   DC ]+ } D | i |   o E t |  n 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   /usr/lib/python2.2/statcache.pys   forget_except_prefix= s
    	c    sT   G H I y J t  |   } Wn  K t i j
 o L d Sn XM t | t  Sd S(   s   Return 1 if directory, else 0.i    N(   s   stats   paths   sts   _oss   errors   S_ISDIRs   ST_MODE(   s   paths   st(    (    s   /usr/lib/python2.2/statcache.pys   isdirG s   (   s   __doc__s   oss   _oss   stats   __all__s   caches   resets   forgets   forget_prefixs
   forget_dirs   forget_except_prefixs   isdir(
   s   resets   forget_except_prefixs   stats   forget_prefixs   _oss   __all__s
   forget_dirs   caches   isdirs   forget(    (    s   /usr/lib/python2.2/statcache.pys   ? s   
	
