flysystem
flysystem copied to clipboard
Adding and ensuring more dedicated tests
Feature Request
Using different adapters, I always see different behaviours. This could be avoided, if there were more dedicated tests in AdapterTestUtilities.
- [x] fileExists should not be true, if it is a directory (#1789)
- [x] directoryExists should not be true, if it is a file (#1789)
Currently, It is not clear what should happen, when:
- [x] move/copy any file onto any other existing file? https://github.com/thephpleague/flysystem/pull/1808
- a few throw exceptions, some just overwrite
- [x] move/copy any file to the same destination? https://github.com/thephpleague/flysystem/pull/1808
- a few throw exceptions, others remove the file, others just updating the visibility
- [ ] deleteDirectory which does not exist
- a few throw exceptions, others ignore it
@frankdejonge is this something we can talk about for v4?
From docs https://flysystem.thephpleague.com/docs/usage/filesystem-api/
Moving and copying are both deterministic operations. This means they will always overwrite the target location, and parent directories are always created (if and when needed)
The other 2 points remain though.
Oh, I forgot the page. but yes, then it is not valid for several adapters.
Those could be files as bugs and be fixed without major release i guess?