mirror of https://github.com/python/cpython
Patch by Itamar S.T. (SF#305470): add reset() method.
This commit is contained in:
parent
53a79060bb
commit
d1d053cc3f
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue