mς %U²Ic@s–dZdkZeideƒ[dkZdkTdddddd d gZhZd „Zd „Z d „Z d„Z d„Z d„Z d„ZdS(syMaintain a cache of stat() information on files. There are functions to reset the cache or to selectively remove items. Ns9The statcache module is obsolete. Use os.stat() instead.(t*tstattresettforgett forget_prefixt forget_dirtforget_except_prefixtisdircCs>ti|dƒ}|djoti|ƒt|<}n|S(s'Stat a file, possibly out of the cache.N(tcachetgettpathtNonetrett_osR(R R ((t&/data/zmath/lib/python2.4/statcache.pyRs  cCstiƒdS(sClear the cache.N(Rtclear(((RRscCs%y t|=Wntj onXdS(s1Remove a given item from the cache, if it exists.N(RR tKeyError(R ((RR$s  cCs9x2tiƒD]$}|i|ƒot|ƒq q WdS(s)Remove all pathnames with a given prefix.N(RtkeysR t startswithtprefixR(RR ((RR+s  cCs†dkl}l}|||dƒƒd}t|ƒxItiƒD];}|i|ƒo%||ƒd|jot|ƒqCqCWdS(sAForget a directory and all entries except for entries in subdirs.(ssplitsjointxxxiN( tos.pathtsplittjoinRRRRR R(RRRR ((RR1s  'cCs9x2tiƒD]$}|i|ƒpt|ƒq q WdS(skRemove all pathnames except with a given prefix. Normally used with prefix = '/' after a chdir(). N(RRR RRR(RR ((RRBs  cCs:yt|ƒ}Wntij o tSnXt|iƒS(s%Return True if directory, else False.N(RR tstR terrortFalsetS_ISDIRtst_mode(R R((RRLs  (t__doc__twarningstwarntDeprecationWarningtosR Rt__all__RRRRRRR( RRRR R"RRRRRR((Rt?s