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
fdStream, Socket resource, or numeric file descriptor.
offsetOffset from beginning of the file
priValues
callbackProto
dataArbitrary variable passed to
callback.
Return Values
eio_ftruncate() returns request resource on success,Falseforfailure.