php-doc-en/reference/filesystem/functions/ftruncate.xml
2003-06-23 01:05:48 +00:00

53 lines
1.6 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.14 -->
<refentry id="function.ftruncate">
<refnamediv>
<refname>ftruncate</refname>
<refpurpose>Truncates a file to a given length</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>ftruncate</methodname>
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
<methodparam><type>int</type><parameter>size</parameter></methodparam>
</methodsynopsis>
<para>
Takes the filepointer, <parameter>handle</parameter>, and truncates the file to
length, <parameter>size</parameter>. &return.success;
</para>
<note>
<para>
Prior to PHP 4.3.3, <function>ftruncate</function> returns an
<type>integer</type> value of 1 on success, instead of
<type>boolean</type> &true;.
</para>
</note>
<para>
See also <function>fopen</function> and
<function>fseek</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->