[Python-checkins] CVS: python/dist/src/Lib dircache.py,1.8,1.9
Guido van Rossum
gvanrossum@users.sourceforge.net
Fri, 02 Mar 2001 05:35:39 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv20570
Modified Files:
dircache.py
Log Message:
Patch by Itamar S.T. (SF#305470): add reset() method.
Index: dircache.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/dircache.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** dircache.py 2001/01/20 19:54:20 1.8
--- dircache.py 2001/03/02 13:35:37 1.9
***************
*** 7,13 ****
import os
! __all__ = ["listdir","opendir","annotate"]
cache = {}
def listdir(path):
--- 7,18 ----
import os
! __all__ = ["listdir", "opendir", "annotate", "reset"]
cache = {}
+
+ def reset():
+ """Reset the cache completely."""
+ global cache
+ cache = {}
def listdir(path):