HH\Lib\OS\lseek

Facebook Engineer?

This function is available as OS\lseek() in Facebook's www repository.

Reposition the current file offset

namespace HH\Lib\OS;

function lseek(
  FileDescriptor $fd,
  int $offset,
  SeekWhence $whence,
): int;

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

Parameters

  • FileDescriptor $fd
  • int $offset
  • SeekWhence $whence

Returns

  • int