Ć
Nö9c       s     d  Z    d k Z  d k T h  Z  d   Z  d   Z  d   Z # d   Z + d   Z < d   Z E 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    sM      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   rets&   /mit/python/lib/python2.0/statcache.pys   stat s
   c      s       h  a  d S(   s   Reset the cache completely.N(   s   cache(    s&   /mit/python/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   paths&   /mit/python/lib/python2.0/statcache.pys   forget s   c    sZ   # $ % t  |   } & x; 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   paths&   /mit/python/lib/python2.0/statcache.pys   forget_prefix# s    	c    s	  + - . |  d d j o
 |  d j o / |  d  }  n 0 t |   1 |  d d j o 2 |  d }  n 3 t |   } 4 x t i   d 4 rp } 5 | |  |  j oV 6 | | } 7 | d d j o 7 | d  } n 8 d | j o 9 t | =n n q 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   rests&   /mit/python/lib/python2.0/statcache.pys
   forget_dir+ s   " 	 c    sZ   < > ? t  |   } @ x; t i   d @ r( } A | |  |  j o B 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   paths&   /mit/python/lib/python2.0/statcache.pys   forget_except_prefix< s    	c    sT   E F G y H t  |   } Wn  I t i j
 o J d Sn XK t | t  Sd S(   s   Check for directory.i    N(   s   stats   paths   sts   oss   errors   S_ISDIRs   ST_MODE(   s   paths   sts&   /mit/python/lib/python2.0/statcache.pys   isdirE s   (
   s   __doc__s   oss   stats   caches   resets   forgets   forget_prefixs
   forget_dirs   forget_except_prefixs   isdir(    s&   /mit/python/lib/python2.0/statcache.pys   ? s   
		