svn: /phpdoc/en/trunk/reference/dio/functions/ dio-open.xml
| From: | Torben Wilson | Date: | Tue, 29 Sep 2009 05:51:35 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/dio/functions/ dio-open.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4997@lists.php.net to get a copy of this message | ||
torben Tue, 29 Sep 2009 05:51:35 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=288931
Log:
Several grammatical fixes and some factual corrections.
Corrected the documentation of the mode param (addresses bug #49645).
Bug: http://bugs.php.net/49645 (Open) dio_open parameters
are incorrect
Changed paths:
U phpdoc/en/trunk/reference/dio/functions/dio-open.xml
Modified: phpdoc/en/trunk/reference/dio/functions/dio-open.xml
===================================================================
--- phpdoc/en/trunk/reference/dio/functions/dio-open.xml 2009-09-29 04:02:36 UTC (rev 288930)
+++ phpdoc/en/trunk/reference/dio/functions/dio-open.xml 2009-09-29 05:51:35 UTC (rev 288931)
@@ -4,8 +4,8 @@
<refnamediv>
<refname>dio_open</refname>
<refpurpose>
- Opens a new filename with specified permissions of flags and
- creation permissions of mode
+ Opens a file (creating it if necessary) at a lower level than the
+ C library input/ouput stream functions allow.
</refpurpose>
</refnamediv>
<refsect1 role="description">
@@ -29,7 +29,7 @@
<term><parameter>filename</parameter></term>
<listitem>
<para>
- The opened file.
+ The pathname of the file to open.
</para>
</listitem>
</varlistentry>
@@ -37,25 +37,45 @@
<term><parameter>flags</parameter></term>
<listitem>
<para>
- The <parameter>flags</parameter> parameter can also include any
- combination of the following flags:
+ The <parameter>flags</parameter> parameter is a bitwise-ORed
+ value comprising flags from the following list. This value
+ <emphasis>must</emphasis> include one of
+ <constant>O_RDONLY</constant>, <constant>O_WRONLY</constant>,
+ or <constant>O_RDWR</constant>. Additionally, it may include
+ any combination of the other flags from this list.
<itemizedlist>
<listitem>
<para>
+ <constant>O_RDONLY</constant> - opens the file for read access.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <constant>O_WRONLY</constant> - opens the file for write access.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <constant>O_RDWR</constant> - opens the file for both reading and
+ writing.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<constant>O_CREAT</constant> - creates the file, if it doesn't
already exist.
</para>
</listitem>
<listitem>
<para>
- <constant>O_EXCL</constant> - if both,
<constant>O_CREAT</constant>
- and <constant>O_EXCL</constant> are set,
<function>dio_open</function>
- fails, if the file already exists.
+ <constant>O_EXCL</constant> - if both
<constant>O_CREAT</constant>
+ and <constant>O_EXCL</constant> are set and the file already
+ exists, causes <function>dio_open</function> to fail.
</para>
</listitem>
<listitem>
<para>
- <constant>O_TRUNC</constant> - if the file exists, and its opened
+ <constant>O_TRUNC</constant> - if the file exists and is opened
for write access, the file will be truncated to zero length.
</para>
</listitem>
@@ -85,28 +105,19 @@
<term><parameter>mode</parameter></term>
<listitem>
<para>
- If <parameter>flags</parameter> is <constant>O_CREAT</constant>,
- <parameter>mode</parameter> will set the mode of the file
- (creation permissions).
- <itemizedlist>
- <listitem>
- <para>
- <constant>O_RDONLY</constant> - opens the file for read access.
- </para>
- </listitem>
- <listitem>
- <para>
- <constant>O_WRONLY</constant> - opens the file for write access.
- </para>
- </listitem>
- <listitem>
- <para>
- <constant>O_RDWR</constant> - opens the file for both reading and
- writing.
- </para>
- </listitem>
- </itemizedlist>
+ If <parameter>flags</parameter> contains
+ <constant>O_CREAT</constant>, <parameter>mode</parameter> will
+ set the permissions of the file (creation
+ permissions). <parameter>Mode</parameter> is required for
+ correct operation when <constant>O_CREAT</constant> is
+ specified in <constant>mode</constant> and is ignored
+ otherwise.
</para>
+ <para>
+ The actual permissions assigned to the created file will be
+ affected by the process's <emphasis>umask</emphasis> setting as
+ per usual.
+ </para>
</listitem>
</varlistentry>
</variablelist>