Function __global->ftruncate

Definitions

sources_custom/phpstub.php

  • Truncates a file to a given length.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$file resource No No required parameter N/A N/A File handle
$size integer No No required parameter N/A N/A Cut off size

Returns

  • Success status
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Truncates a file to a given length.
 *
 * @param  resource $file File handle
 * @param  integer $size Cut off size
 * @return boolean Success status
 */

function ftruncate($file, int $size) : bool