-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial translations in reference/posix
- Loading branch information
1 parent
2c70943
commit 28b5b58
Showing
42 changed files
with
4,281 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- EN-Revision: 8d417bd83842efbde90dbb51c31f99f474437ce4 Maintainer: leonardolara Status: ready --> | ||
<refentry xml:id="function.posix-access" xmlns="http://docbook.org/ns/docbook"> | ||
<refnamediv> | ||
<refname>posix_access</refname> | ||
<refpurpose> | ||
Determina a acessibilidade de um arquivo | ||
</refpurpose> | ||
</refnamediv> | ||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis> | ||
<type>bool</type><methodname>posix_access</methodname> | ||
<methodparam><type>string</type><parameter>filename</parameter></methodparam> | ||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam> | ||
</methodsynopsis> | ||
<para> | ||
<function>posix_access</function> verifica as permissões de usuário a um arquivo. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<para> | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>filename</parameter></term> | ||
<listitem> | ||
<para> | ||
O nome do arquivo a ser verificado. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>flags</parameter></term> | ||
<listitem> | ||
<para> | ||
Uma máscara de bits consistindo em uma ou mais das constantes <constant>POSIX_F_OK</constant>, | ||
<constant>POSIX_R_OK</constant>, <constant>POSIX_W_OK</constant> e | ||
<constant>POSIX_X_OK</constant>. | ||
</para> | ||
<para> | ||
<constant>POSIX_R_OK</constant>, <constant>POSIX_W_OK</constant> e | ||
<constant>POSIX_X_OK</constant> solicitam a verificação da existência do arquivo | ||
e se ele tem permissões de leitura, escrita e execução, respectivamente. | ||
<constant>POSIX_F_OK</constant> apenas solicita a verificação da | ||
existência do arquivo. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<para> | ||
&return.success; | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="examples"> | ||
&reftitle.examples; | ||
<para> | ||
<example> | ||
<title>Exemplo de <function>posix_access</function></title> | ||
<para> | ||
Este exemplo verifica que o arquivo $file tem permissão de leitura e escrita, caso contrário | ||
exibe uma mensagem de erro. | ||
</para> | ||
<programlisting role="php"> | ||
<![CDATA[ | ||
<?php | ||
$file = 'algum_arquivo'; | ||
if (posix_access($file, POSIX_R_OK | POSIX_W_OK)) { | ||
echo 'O arquivo pode ser lido e escrito!'; | ||
} else { | ||
$error = posix_get_last_error(); | ||
echo "Erro $error: " . posix_strerror($error); | ||
} | ||
?> | ||
]]> | ||
</programlisting> | ||
</example> | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<para> | ||
<simplelist> | ||
<member><function>posix_get_last_error</function></member> | ||
<member><function>posix_strerror</function></member> | ||
</simplelist> | ||
</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:"~/.phpdoc/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 | ||
--> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- EN-Revision: f8854f6a6a7907720ed8ec8657a2f466a82c0394 Maintainer: leonardolara Status: ready --> | ||
<refentry xml:id="function.posix-ctermid" xmlns="http://docbook.org/ns/docbook"> | ||
<refnamediv> | ||
<refname>posix_ctermid</refname> | ||
<refpurpose>Obtém o caminho do terminal em controle</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis> | ||
<type class="union"><type>string</type><type>false</type></type><methodname>posix_ctermid</methodname> | ||
<void/> | ||
</methodsynopsis> | ||
<para> | ||
Gera uma <type>string</type> contendo o caminho para o terminal | ||
atualmente em controle para o processo. Em caso de erro, será gerado um número de erro, | ||
que pode ser verificado usando <function>posix_get_last_error</function>. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
&no.function.parameters; | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<para> | ||
Em caso de sucesso, retorna uma <type>string</type> do caminho para | ||
o terminal atualmente em controle. Caso contrário, retorna &false; e um número de erro | ||
é definido e poderá ser verificado com <function>posix_get_last_error</function>. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="examples"> | ||
&reftitle.examples; | ||
<para> | ||
<example> | ||
<title>Exemplo de <function>posix_ctermid</function></title> | ||
<para> | ||
Este exemplo exibe o caminho para o TTY atual. | ||
</para> | ||
<programlisting role="php"> | ||
<![CDATA[ | ||
<?php | ||
echo "Estou sendo executado a partir de ".posix_ctermid(); | ||
?> | ||
]]> | ||
</programlisting> | ||
</example> | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<para> | ||
<simplelist> | ||
<member><function>posix_ttyname</function></member> | ||
<member><function>posix_get_last_error</function></member> | ||
</simplelist> | ||
</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:"~/.phpdoc/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 | ||
--> |
Oops, something went wrong.