reactphp / filesystem

Evented filesystem access.
MIT License
135 stars 40 forks source link

Add Adapter::getContents & Adapter::putContents #62

Closed ghost closed 5 years ago

ghost commented 5 years ago

This PR adds file read and write optimizations on the adapter level. Essentially it collapses open/read/close and open/write/close calls into one. Child Process is such an adapter which can use this optimization to reduce message passing & latency. Eio simulates the optimization by calling the necessary methods in sequence by itself.

Part of #46 & https://github.com/reactphp/filesystem/issues/46#issuecomment-433827487.

I want to add Eio has a very weird behaviour.

ghost commented 5 years ago

@clue If you have any specific naming in mind, speak your mind. If you can think of better names, it's better to change it now than later.

WyriHaximus commented 5 years ago

@clue ping

ghost commented 5 years ago

@clue Reminder. Also a reminder for buzz.

ghost commented 5 years ago

@clue @jsor @WyriHaximus I've got a new idea on how to expose "non-standardizable" feature. As such I've updated the PR and would need to be looked at again.

ghost commented 5 years ago

@clue Updated!

WyriHaximus commented 5 years ago

@CharlotteDunois could you squash both commits together? Will merge afterwards 👍