« Swoole\Async::dnsLookup
Swoole\Async::readFile »

Swoole\Async::read

(PECL swoole >= 1.9.0)

Swoole\Async::read — Read file stream asynchronously.

説明

public static function Swoole\Async::read(
    string $filename,
    callable $callback,
    int $chunk_size = ?,
    int $offset = ?
): bool

パラメータ

filename

The name of the file.

callback
function callback(string $filename, string $content): mixed
filename

The name of the file.

content

The content read from the file stream.

chunk_size

The chunk length.

offset

The offset.

戻り値

Whether the read is succeed.

関連キーワード:
Swoole   Async   read   stream   filename   Read   asynchronously   callback   chunk   offset   content   size   dnsLookup   readFile   swoole   static   callable   mixed   length   Whether   succeed
関連する関数・ページ:
swoole-async.readfile   class.swoole-async   swoole-async.write   swoole-async.writefile   function.swoole-async-read   swoole-async.dnslookup