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
annotate(head, list) |
Add ‘/’ suffixes to directories. |
listdir(path) |
List directory contents, using cache. |
opendir(path) |
List directory contents, using cache. |
reset() |
Reset the cache completely. |