Download the PHP package phasync/file-streamwrapper without Composer
On this page you can find all versions of the php package phasync/file-streamwrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phasync/file-streamwrapper
More information about phasync/file-streamwrapper
Files in phasync/file-streamwrapper
Package file-streamwrapper
Short Description Makes file IO asynchronous in phasync coroutines.
License MIT
Informations about the package file-streamwrapper
phasync/file-streamwrapper
phasync/file-streamwrapper
is a PHP package that makes all disk IO operations asynchronous transparently, when used within a phasync coroutine. This package allows you to perform file operations like reading and writing files asynchronously, improving the efficiency of your I/O-bound tasks.
Installation
You can install the package via Composer. There is configuration needed as it automatically configures itself to be enabled inside coroutines and disables itself outside of coroutines.
Usage
When installing this package, async file:// IO is automatically enabled inside phasync coroutines. It does not interfere with IO outside of coroutines.
Example
Here's an example of how to use phasync/file-streamwrapper within the phasync coroutine framework:
In this example, two files are read asynchronously using file_get_contents within phasync coroutines. The custom stream wrapper ensures that these file operations are non-blocking and efficient.
License
This package is open-source and licensed under the MIT License.
Contributing
Contributions are welcome! Please submit pull requests or open issues for any bugs or feature requests.
Contact
For any questions or inquiries, please open an issue on the GitHub repository.