cvs: peardoc /en/package/filesystem/file writeline.xml
| From: | Christian Weiske | Date: | Tue, 04 Mar 2008 07:29:43 +0000 |
| Subject: | cvs: peardoc /en/package/filesystem/file writeline.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-10554@lists.php.net to get a copy of this message | ||
cweiske Tue Mar 4 07:29:43 2008 UTC
Modified files:
/peardoc/en/package/filesystem/file writeline.xml
Log:
fix bug #6166: Lack of information
http://cvs.php.net/viewvc.cgi/peardoc/en/package/filesystem/file/writeline.xml?r1=1.4&r2=1.5&diff_format=u
Index: peardoc/en/package/filesystem/file/writeline.xml
diff -u peardoc/en/package/filesystem/file/writeline.xml:1.4
peardoc/en/package/filesystem/file/writeline.xml:1.5
--- peardoc/en/package/filesystem/file/writeline.xml:1.4 Sat Apr 1 12:33:34 2006
+++ peardoc/en/package/filesystem/file/writeline.xml Tue Mar 4 07:29:43 2008
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="package.filesystem.file.writeline">
<refnamediv>
<refname>File::writeLine()</refname>
@@ -30,35 +30,62 @@
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
+
<refsect1 id="package.filesystem.file.writeline.desc">
&title.desc;
<para>
+ Writes a single line, appending a linefeed by default.
</para>
</refsect1>
+
<refsect1 id="package.filesystem.file.writeline.parameter">
&title.param;
- <para>
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>$filename</literal> - Name of file to write to
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>$line</literal> - Line of data to be written to file
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>$mode</literal> - Write mode, can be either
+ <literal>FILE_MODE_WRITE</literal> or
<literal>FILE_MODE_APPEND</literal>.
+ Defaults to appending.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>$crlf</literal> - Carriage return / line feed your system is using.
+ Defaults to LF (<literal>\n</literal>), but can be set to anything.
+ On Unix, <literal>\n</literal> is used, on
+ Windows <literal>\r\n</literal> and Mac OS uses <literal>\r</literal>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <literal>$lock</literal> - If the file shall be locked
+ </para>
+ </listitem>
+ </itemizedlist>
</refsect1>
+
<refsect1 id="package.filesystem.file.writeline.return">
&title.returns;
<para>
+ <classname>PEAR_Error</classname> when an error occured, number of bytes
+ written when all went well (crlf included).
</para>
</refsect1>
- <refsect1 id="package.filesystem.file.writeline.throws">
- &title.throws;
- <para>
- </para>
- </refsect1>
- <refsect1 id="package.filesystem.file.writeline.note">
- &title.note;
- ¬e.canstatic;
- </refsect1>
- <refsect1 id="package.filesystem.file.writeline.see">
- &title.see;
- <para>
- </para>
- </refsect1>
+
<refsect1 id="package.filesystem.file.writeline.example">
&title.example;
<example>
@@ -74,7 +101,7 @@
echo 'Could not write to file : ' . $e->getMessage();
} else {
echo "Successfully wrote to file test.txt\n";
-}
+}
?>
]]>
</programlisting>