-
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.
Translate file reference/fileinfo/functions/finfo-file.xml
- Loading branch information
Adiel Cristo
committed
Aug 24, 2023
1 parent
cbbb12e
commit f4f6944
Showing
5 changed files
with
171 additions
and
10 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
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
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,160 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- EN-Revision: 811ee28918e320b3f2d9324ef0f9feae816091b5 Maintainer: adiel Status: ready --> | ||
|
||
<refentry xml:id="function.finfo-file" xmlns="http://docbook.org/ns/docbook"> | ||
<refnamediv> | ||
<refname>finfo_file</refname> | ||
<refname>finfo::file</refname> | ||
<refpurpose>Retorna informações sobre um arquivo</refpurpose> | ||
</refnamediv> | ||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<para>&style.procedural;</para> | ||
<methodsynopsis> | ||
<type class="union"><type>string</type><type>false</type></type><methodname>finfo_file</methodname> | ||
<methodparam><type>finfo</type><parameter>finfo</parameter></methodparam> | ||
<methodparam><type>string</type><parameter>nome_do_arquivo</parameter></methodparam> | ||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam> | ||
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>contexto</parameter><initializer>&null;</initializer></methodparam> | ||
</methodsynopsis> | ||
<para>&style.oop;</para> | ||
<methodsynopsis role="finfo"> | ||
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>finfo::file</methodname> | ||
<methodparam><type>string</type><parameter>nome_do_arquivo</parameter></methodparam> | ||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam> | ||
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>contexto</parameter><initializer>&null;</initializer></methodparam> | ||
</methodsynopsis> | ||
|
||
<para> | ||
Esta função é usada para obter informações sobre um arquivo. | ||
</para> | ||
|
||
</refsect1> | ||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<para> | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>finfo</parameter></term> | ||
<listitem> | ||
&fileinfo.parameters.finfo; | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>nome_do_arquivo</parameter></term> | ||
<listitem> | ||
<para> | ||
Nome do arquivo a ser verificado. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>flags</parameter></term> | ||
<listitem> | ||
<para> | ||
Uma ou disjunção de mais | ||
<link linkend="fileinfo.constants">constantes Fileinfo</link>. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>contexto</parameter></term> | ||
<listitem> | ||
<para> | ||
Para uma descrição de <literal>contextos</literal>, consulte <xref linkend="ref.stream"/>. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</para> | ||
</refsect1> | ||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<para> | ||
Retorna uma descrição textual do conteúdo do argumento | ||
<parameter>nome_do_arquivo</parameter> ou &false; em caso de erro. | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="changelog"> | ||
&reftitle.changelog; | ||
<informaltable> | ||
<tgroup cols="2"> | ||
<thead> | ||
<row> | ||
<entry>&Version;</entry> | ||
<entry>&Description;</entry> | ||
</row> | ||
</thead> | ||
<tbody> | ||
&fileinfo.changelog.finfo-object; | ||
<row> | ||
<entry>8.0.0</entry> | ||
<entry> | ||
O parâmetro <parameter>contexto</parameter> agora pode ser nulo. | ||
</entry> | ||
</row> | ||
</tbody> | ||
</tgroup> | ||
</informaltable> | ||
</refsect1> | ||
|
||
<refsect1 role="examples"> | ||
&reftitle.examples; | ||
<para> | ||
<example> | ||
<title>Exemplo de <function>finfo_file</function></title> | ||
<programlisting role="php"> | ||
<![CDATA[ | ||
<?php | ||
// retorna o tipo MIME, também conhecido como extensão mimetype | ||
$finfo = finfo_open(FILEINFO_MIME_TYPE); | ||
foreach (glob("*") as $nome_do_arquivo) { | ||
echo finfo_file($finfo, $nome_do_arquivo) . "\n"; | ||
} | ||
finfo_close($finfo); | ||
?> | ||
]]> | ||
</programlisting> | ||
&example.outputs.similar; | ||
<screen> | ||
<![CDATA[ | ||
text/html | ||
image/gif | ||
application/vnd.ms-excel | ||
]]> | ||
</screen> | ||
</example> | ||
</para> | ||
</refsect1> | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<para> | ||
<simplelist> | ||
<member><function>finfo_buffer</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 | ||
--> |
Nomes de parâmetros não devem ser traduzidos, por conta de: https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments
Alguém que ler o manual pode tentar chamar funções ou métodos com parâmetros nomeados traduzidos e vai resultar em erro.