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

eio_truncate

PHP function Edit on GitHub ✎

(PECL eio >= 0.0.1dev)

Truncate a file

Description

eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, mixed $data = NULL): resource

eio_truncate() causes the regular file named by path to be truncated to a size of precisely length bytes

Parameters

path

File path

offset

Offset from beginning of the file.

pri

Values

callback

Proto

data

Arbitrary variable passed to callback.

Return Values

eio_truncate() returns request resource on success,Falseforfailure.

See Also

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