Ζ
λή?:c       s_   d  Z  d k Z d k Th  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.
N(   s   *c    s;   t  i |   o t  |  Sn t i |   t  |  <} | Sd S(   s'   Stat a file, possibly out of the cache.N(   s   caches   has_keys   paths   oss   stats   ret(   s   paths   rets8   /home/guest/edwardam/cmp2/py2/lib/python2.0/statcache.pys   stat s
     c      s
   h  a  d S(   s   Reset the cache completely.N(   s   cache(    s8   /home/guest/edwardam/cmp2/py2/lib/python2.0/statcache.pys   reset s      c    s   t  i |   o t  |  =n d S(   s1   Remove a given item from the cache, if it exists.N(   s   caches   has_keys   path(   s   paths8   /home/guest/edwardam/cmp2/py2/lib/python2.0/statcache.pys   forget s     c    sE   t  |   } x2 t i   d r" } | |  |  j o t | =n q Wd S(   s)   Remove all pathnames with a given prefix.i    N(   s   lens   prefixs   ns   caches   keyss   path(   s   prefixs   ns   paths8   /home/guest/edwardam/cmp2/py2/lib/python2.0/statcache.pys   forget_prefix# s      c    sΩ   |  d d j o
 |  d j o |  d  }  n t |   |  d d j o |  d }  n t |   } xn t i   d r^ } | |  |  j oG | | } | d d j o | d  } n d | j o t | =n n qs Wd S(   sY   Forget about a directory and all entries in it, but not about
	entries in subdirectories.i   s   /i    N(   s   prefixs   forgets   lens   ns   caches   keyss   paths   rest(   s   prefixs   ns   paths   rests8   /home/guest/edwardam/cmp2/py2/lib/python2.0/statcache.pys
   forget_dir+ s     
 
 c    sE   t  |   } x2 t i   d r" } | |  |  j o t | =n q Wd S(   sb   Remove all pathnames except with a given prefix.
	Normally used with prefix = '/' after a chdir().i    N(   s   lens   prefixs   ns   caches   keyss   path(   s   prefixs   ns   paths8   /home/guest/edwardam/cmp2/py2/lib/python2.0/statcache.pys   forget_except_prefix< s      c    s?   y t  |   } Wn t i j
 o d Sn Xt | t  Sd S(   s   Check for directory.i    N(   s   stats   paths   sts   oss   errors   S_ISDIRs   ST_MODE(   s   paths   sts8   /home/guest/edwardam/cmp2/py2/lib/python2.0/statcache.pys   isdirE s     	(
   s   __doc__s   oss   stats   caches   resets   forgets   forget_prefixs
   forget_dirs   forget_except_prefixs   isdir(    s8   /home/guest/edwardam/cmp2/py2/lib/python2.0/statcache.pys   ? s   								