1
0
mirror of https://github.com/php/doc-es.git synced 2026-03-24 23:42:11 +01:00
Files
Philippe DELENTE 9f7804a633 Feature/update revision en misc page reference (#248)
* feat(translation): update revision EN

* feat(translation): update revision EN
2025-07-02 22:37:23 +02:00

125 lines
3.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: a7d00d0b9169ac0ca5e35dbed32ee288f4614586 Maintainer: PhilDaiguille Status: ready -->
<!-- Reviewed: yes -->
<refentry xml:id="filesystemiterator.setflags" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>FilesystemIterator::setFlags</refname>
<refpurpose>Configura las opciones</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="FilesystemIterator">
<modifier>public</modifier> <type>void</type><methodname>FilesystemIterator::setFlags</methodname>
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
</methodsynopsis>
<para>
Configura las opciones.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem>
<para>
Las opciones a configurar.
Ver la lista de <link linkend="filesystemiterator.constants">constantes de <classname>FilesystemIterator</classname></link>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Ejemplo con <methodname>FilesystemIterator::key</methodname></title>
<para>
Este ejemplo ilustra la diferencia entre las opciones
<link linkend="filesystemiterator.constants.key-as-pathname">FilesystemIterator::KEY_AS_PATHNAME</link> y
<link linkend="filesystemiterator.constants.key-as-filename">FilesystemIterator::KEY_AS_FILENAME</link>.
</para>
<programlisting role="php">
<![CDATA[
<?php
$iterator = new FilesystemIterator(dirname(__FILE__), FilesystemIterator::KEY_AS_PATHNAME);
echo "Clave como nombre de ruta : \n";
foreach ($iterator as $key => $fileinfo) {
echo $key . "\n";
}
$iterator->setFlags(FilesystemIterator::KEY_AS_FILENAME);
echo "\nClave como nombre de archivo : \n";
foreach ($iterator as $key => $fileinfo) {
echo $key . "\n";
}
?>
]]>
</programlisting>
&example.outputs.82.similar;
<screen>
<![CDATA[
Clave como nombre de ruta :
/www/examples/.
/www/examples/.. /www/examples/apple.jpg
/www/examples/banana.jpg
/www/examples/example.php
Clave como nombre de archivo :
.
..
apple.jpg
banana.jpg
example.php
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>FilesystemIterator::__construct</methodname></member>
<member><methodname>FilesystemIterator::getFlags</methodname></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
-->