编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录
  • « streamWrapper::stream_tell
  • streamWrapper::stream_write »
  • PHP Manual
  • streamWrapper
  • Truncate stream

streamWrapper::stream_truncate

(PHP 5 >= 5.4.0, PHP 7)

streamWrapper::stream_truncate — Truncate stream

说明

public streamWrapper::stream_truncate ( int $new_size ) : bool

Will respond to truncation, e.g., through ftruncate().

参数

new_size

The new size.

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE。

参见

  • ftruncate() - 将文件截断到给定的长度

相关文章
php stream context options callback when reading the mongodb replyphp stream 函数 别名 stream set blockingphp stream 函数 attach a filter to a streamphp stream 函数 register a user defined stream filterphp stream 函数 设置资源流区块大小php stream 函数 set read file buffering on the given streamphp stream 函数 unregister a url wrapperphp swoole 函数 read file stream asynchronouslyphp harudoc save the document into a temporary streamphp 手册 stream context optionsphp streamwrapper constructs a new stream wrapperphp streamwrapper destructs an existing stream wrapperphp streamwrapper flushes the outputphp streamwrapper change stream metadataphp streamwrapper read from streamphp streamwrapper seeks to specific location in a streamphp streamwrapper change stream optionsphp streamwrapper retrieve the current position of a streamphp streamwrapper truncate streamphp streamwrapper write to stream
关注编程学问公众号
编程学问网 湘ICP备20001732号