Wrap returns an Entry that wraps another Entry and caches directory reads.
(e fs.Entry, cacher DirectoryCacher)
| 56 | |
| 57 | // Wrap returns an Entry that wraps another Entry and caches directory reads. |
| 58 | func Wrap(e fs.Entry, cacher DirectoryCacher) fs.Entry { |
| 59 | return wrapWithContext(e, &cacheContext{cacher}) |
| 60 | } |
| 61 | |
| 62 | func wrapWithContext(e fs.Entry, opts *cacheContext) fs.Entry { |
| 63 | switch e := e.(type) { |