Frank Kleine
Frank Kleine
I just played around with that, thanks for providing the test. It seems like the fault isn't in vfsStream. `vfsStreamWrapper::stream_read()` always receives a value of 8192, independent of what is...
There's a workaround, though: you can change the default value `vfsStreamWrapper::stream_read()` receives with `stream_set_chunk_size()`. If you set it to `stream_set_chunk_size($fp2, strlen($contentA))` the second read will return exactly what is expected....
Unfortunately, `stream_set_read_buffer()` can't be used. It always returns -1 if applied to a vfs resource, meaning PHP says it can't honor this request.
Great find! Although I'm a bit surprised that it took more than 12 years to find that my [initial eof implementation](https://github.com/bovigo/vfsStream/commit/46d3e42e40bc7b4d3a3d4174ee6633c9678b92f8#diff-de0f30d12f800c78c823448eaae0f9a9R140) is flawed. 😁
I really like it. I also like the idea of generating code coverage using these tests - maybe we can find some dead code.
Regarding the directory structure with `src/main/php/org/bovigo/vfs`: I didn't go further when the switch from PSR-1 to PSR-4 was made because I always thought I'd like to drop the org part...
I guess it is due to the fact the vfsStream doesn't block. It could be done, but currently it is not implemented. Also see #15.
> Introducing a class with such a generic name like Directory or File would cause users to have to set aliases in their use statements if they're using real filesystem...
No, currently I have no plans for this, as I'm missing both the time and need for doing this. So any PR is welcome.
I'm unsure about this. If we go down that route we might have to think about whether we want to disallow certain file extensions that are forbidden on Windows. Where...