[PHP 8.3] posix: amendments and stub pages for new functions#2925
Closed
Girgias wants to merge 1 commit into
Closed
[PHP 8.3] posix: amendments and stub pages for new functions#2925Girgias wants to merge 1 commit into
Girgias wants to merge 1 commit into
Conversation
Member
|
I ll get to it sometime this week. |
devnexen
reviewed
Nov 8, 2023
| </methodsynopsis> | ||
| &warn.undocumented.func; | ||
| <para> | ||
| Description. |
Member
There was a problem hiding this comment.
<function>posix_eaccess</function> checks the effective user's permission of a file.
| <term><parameter>filename</parameter></term> | ||
| <listitem> | ||
| <para> | ||
| Description. |
Member
There was a problem hiding this comment.
The name of a file to be tested.
| <term><parameter>flags</parameter></term> | ||
| <listitem> | ||
| <para> | ||
| Description. |
Member
There was a problem hiding this comment.
<para>
A mask consisting of one or more of <constant>POSIX_F_OK</constant>,
<constant>POSIX_R_OK</constant>, <constant>POSIX_W_OK</constant> and
<constant>POSIX_X_OK</constant>.
</para>
<para>
<constant>POSIX_R_OK</constant>, <constant>POSIX_W_OK</constant> and
<constant>POSIX_X_OK</constant> request checking whether the file
exists and has read, write and execute permissions, respectively.
<constant>POSIX_F_OK</constant> just requests checking for the
existence of the file.
</para>
| <example xml:id="function.posix-eaccess.example.basic"> | ||
| <title><function>posix_eaccess</function> example</title> | ||
| <para> | ||
| Description. |
Member
There was a problem hiding this comment.
<para>
<example>
<title><function>posix_eaccess</function> example</title>
<para>
This example will check if the $file is readable and writable, otherwise
will print an error message.
</para>
<programlisting role="php">
<![CDATA[
<?php
$file = 'some_file';
if (posix_eaccess($file, POSIX_R_OK | POSIX_W_OK)) {
echo 'The file is readable and writable!';
} else {
$error = posix_get_last_error();
echo "Error $error: " . posix_strerror($error);
}
?>
]]>
| </row> | ||
| </thead> | ||
| <tbody> | ||
| <row> |
Member
There was a problem hiding this comment.
<row>
<entry>8.3.0</entry>
<entry>
Checks the effective user/group for a file, differing
from <function>posix_access</function> which checks
from the real user/group.
</entry>
</row>
Member
Author
|
Superseded by #2928 2928 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@devnexen as you know the most about POSIX could you help writing the documentation?