コード例 #1
0
 /**
  * Will respond to truncation, e.g., through ftruncate()
  *
  * Truncates a stream
  *
  * NOTE:
  * If $new_size is larger than the file then the file is extended with null bytes.
  * If $new_size is smaller than the file then the file is truncated to that size.
  *
  * ( http://www.php.net/manual/en/function.ftruncate.php )
  *
  * @param Integer $new_size
  * @return bool
  * @access public
  */
 public function stream_truncate($new_size)
 {
     return $this->sftp->truncate($this->path, $new_size);
 }