Module dircache
[hide private]
[frames] | no frames]

Module dircache

Read and cache directory listings.

The listdir() routine returns a sorted list of the files in a directory, using a cache to avoid reading the directory more often than necessary. The annotate() routine appends slashes to directories.

Functions [hide private]
 
reset()
Reset the cache completely.
 
listdir(path)
List directory contents, using cache.
 
opendir(path)
List directory contents, using cache.
 
annotate(head, list)
Add '/' suffixes to directories.
Variables [hide private]
  cache = {}

Imports: os