php8.5
Home/ Manual/ eio / functions/ eio_ftruncate

eio_ftruncate

PHP function Edit on GitHub ✎

(PECL eio >= 0.0.1dev)

Truncate a file

Description

eio_ftruncate(mixed $fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, mixed $data = NULL): resource

eio_ftruncate() causes a regular file referenced by fd file descriptor to be truncated to precisely length bytes.

Parameters

fd

Stream, Socket resource, or numeric file descriptor.

offset

Offset from beginning of the file

pri

Values

callback

Proto

data

Arbitrary variable passed to callback.

Return Values

eio_ftruncate() returns request resource on success,Falseforfailure.

See Also

Source: reference/eio/functions/eio-ftruncate.xml · from the official PHP manual (php/doc-en)