HH\Lib\OS\read

Meta Engineer?

This is available as OS\read in the www repository.

Read from the specified FileDescriptor

namespace HH\Lib\OS;

function read(
  FileDescriptor $fd,
  int $max_bytes,
): string;

See man 2 read for details. On error, an ErrnoException will be thrown.

Parameters

  • FileDescriptor $fd
  • int $max_bytes

Returns

  • string