Swoole\Async::readFile
PHP function
Edit on GitHub ✎
(PECL swoole >= 1.9.0)
Read a file asynchronously.
Description
Swoole\Async::readFile(string $filename, callable $callback): void
Parameters
filenameThe filename of the file being read.
callback- callback(string $filename, string $content): mixed
filenameThe name of the file.
contentThe content read from the file.