Swoole Swoole\Async::read

(PECL swoole >= 1.9.0)

Swoole\Async::read — 파일 스트림을 비동기적으로 읽습니다.


설명

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

매개변수

filename
파일의 이름입니다.
callback

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

filename
파일의 이름입니다.
content
파일 스트림에서 읽은 콘텐츠입니다.
chunk_size
청크 길이.
offset
오프셋.

반환 값

읽기 성공 여부입니다.