flysystem-stream-wrapper
flysystem-stream-wrapper copied to clipboard
stat()/file_exists() always returns on non-existent files with AWS adapter
When using stat()/file_exists() methods when backend is AWS v3 adapter you always get either true or stat results that are all 0.
If backend is local then these issues do not happen.
https://github.com/twistor/flysystem-stream-wrapper/blob/master/src/Flysystem/Plugin/Stat.php#L117
Ok so I think the problem is twofold
- if you get a literal FALSE back from getMetadata() it will normally mean it does not exist, the method itself does not throw exception
- if you did a test for
has()first you can check if it really exists before you do getMetadata()
The root stems from if you have 'disable_assert' enabled on the Filesystem.