2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2005-04-29 14:19:03 +00:00
|
|
|
<!-- $Revision: 1.7 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- 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>
|
2003-01-11 18:20:22 +00:00
|
|
|
<type>bool</type><methodname>ftruncate</methodname>
|
2003-01-13 02:54:28 +00:00
|
|
|
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
2002-04-15 00:12:54 +00:00
|
|
|
<methodparam><type>int</type><parameter>size</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2003-01-13 02:54:28 +00:00
|
|
|
Takes the filepointer, <parameter>handle</parameter>, and truncates the file to
|
2003-01-27 02:50:41 +00:00
|
|
|
length, <parameter>size</parameter>. &return.success;
|
2002-04-15 00:12:54 +00:00
|
|
|
</para>
|
2005-04-29 14:19:03 +00:00
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
The file pointer is changed only in <emphasis>append</emphasis> mode. In
|
|
|
|
<emphasis>write</emphasis> mode, additional <function>fseek</function>
|
|
|
|
call is needed.
|
|
|
|
</para>
|
|
|
|
</note>
|
2003-06-23 01:05:48 +00:00
|
|
|
<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>
|
2002-04-15 00:12:54 +00:00
|
|
|
</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
|
|
|
|
-->
|