Patch by Itamar S.T. (SF#305470): add reset() method.

This commit is contained in:
Guido van Rossum 2001-03-02 13:35:37 +00:00
parent 53a79060bb
commit d1d053cc3f
1 changed files with 6 additions and 1 deletions

View File

@ -6,10 +6,15 @@ The annotate() routine appends slashes to directories."""
import os
__all__ = ["listdir","opendir","annotate"]
__all__ = ["listdir", "opendir", "annotate", "reset"]
cache = {}
def reset():
"""Reset the cache completely."""
global cache
cache = {}
def listdir(path):
"""List directory contents, using cache."""
try: