Php/docs/streamwrapper.stream-truncate

提供:Dev Guides
< Php
移動先:案内検索

streamWrapper::stream_truncate

(PHP 5 >= 5.4.0, PHP 7)

streamWrapper::stream_truncateストリームを丸める


説明

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

ftruncate() などによる丸めの際にコールされます。


パラメータ

new_size
新しいサイズ。


返り値

成功した場合に true を、失敗した場合に false を返します。


参考

  • ftruncate() - ファイルを指定した長さに丸める