streamWrapper::stream_truncate()
(PHP 5 >= 5.4.0, PHP 7)
Truncate stream
说明
public streamWrapper::stream_truncate(int $new_size): bool
Will respond to truncation, e.g.,throughftruncate().
参数
- $new_size
The new size.
返回值
成功时返回TRUE
,或者在失败时返回FALSE
。
参见
ftruncate()
将文件截断到给定的长度