diff --git a/CHANGELOG.md b/CHANGELOG.md index ef16734e..1da79192 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). Closes [#459](https://github.com/PyFilesystem/pyfilesystem2/issues/459). ### Fixed +- Documented the case-sensitive cached entry lookup in `fs.wrap.WrapCachedDir` + ([#560](https://github.com/PyFilesystem/pyfilesystem2/issues/560)). - Elaborated documentation of `filter_dirs` and `exclude_dirs` in `fs.walk.Walker`. Closes [#371](https://github.com/PyFilesystem/pyfilesystem2/issues/371). - Fixes a backward incompatibility where `fs.move.move_file` raises `DestinationExists` diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 78102487..0c83dd51 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -20,6 +20,7 @@ Many thanks to the following developers for contributing to this project: - [George Macon](https://github.com/gmacon) - [Giampaolo Cimino](https://github.com/gpcimino) - [@Hoboneer](https://github.com/Hoboneer) +- [@Hugohong258](https://github.com/Hugohong258) - [Jen Hagg](https://github.com/jenhagg) - [Joseph Atkins-Turkish](https://github.com/Spacerat) - [Joshua Tauberer](https://github.com/JoshData) diff --git a/fs/wrap.py b/fs/wrap.py index de38d083..802a9e81 100644 --- a/fs/wrap.py +++ b/fs/wrap.py @@ -90,6 +90,12 @@ class WrapCachedDir(WrapFS[_F], typing.Generic[_F]): used only in a fairly limited scope where you don't expected anything on the filesystem to change. + Cached directory entries are matched case-sensitively by + `~fs.base.FS.getinfo`, `~fs.base.FS.isdir`, and `~fs.base.FS.isfile`, + even when the wrapped filesystem is case-insensitive. Use the spelling + returned by `~fs.base.FS.scandir`, or query the wrapped filesystem + directly if case-insensitive lookups are needed. + """ # FIXME (@althonos): The caching data structure can very likely be