cvs: phpdoc-es / translation.xml /reference/filesystem/functions disk-free-space.xml disk-total-space.xml fflush.xml file-get-contents.xml
file-put-contents.xml fnmatch.xml fstat.xml ftruncate.xml is-uploaded-file.xml
| From: | Leonardo Boshell | Date: | Thu, 13 Nov 2003 06:38:54 +0000 |
| Subject: | cvs: phpdoc-es / translation.xml /reference/filesystem/functions disk-free-space.xml disk-total-space.xml fflush.xml file-get-contents.xml file-put-contents.xml fnmatch.xml fstat.xml ftruncate.xml is-uploaded-file.xml |
||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-406@lists.php.net to get a copy of this message | ||
lboshell Thu Nov 13 01:38:54 2003 EDT
Added files:
/phpdoc-es/reference/filesystem/functions disk-free-space.xml
disk-total-space.xml
fflush.xml
file-get-contents.xml
file-put-contents.xml
fnmatch.xml fstat.xml
ftruncate.xml
is-uploaded-file.xml
Modified files:
/phpdoc-es translation.xml
Log:
Nuevos archivos de reference/filesystem. Asignacion de nuevo trabajo.
Index: phpdoc-es/translation.xml diff -u phpdoc-es/translation.xml:1.84 phpdoc-es/translation.xml:1.85 --- phpdoc-es/translation.xml:1.84 Tue Nov 11 22:25:51 2003 +++ phpdoc-es/translation.xml Thu Nov 13 01:38:52 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.84 $ --> +<!-- $Revision: 1.85 $ --> <!DOCTYPE translation SYSTEM "../entities/translation.dtd"> <translation> @@ -44,14 +44,10 @@ <file name="reference/dio/functions/dio-tcsetattr.xml" person="javi" type="translation" date="09.11.2003"/> <file name="reference/dio/functions/dio-truncate.xml" person="javi" type="translation" date="09.11.2003"/> <file name="reference/dio/functions/dio-write.xml" person="javi" type="translation" date="09.11.2003"/> -<file name="reference/filesystem/functions/disk-free-space.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/disk-total-space.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/fflush.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/file-get-contents.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/file-put-contents.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/fnmatch.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/fstat.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/ftruncate.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/is-uploaded-file.xml" person="lboshell" type="translation" date="11.11.2003"/> +<file name="reference/filesystem/functions/is-writable.xml" person="lboshell" type="translation" date="13.11.2003"/> +<file name="reference/filesystem/functions/parse-ini-file.xml" person="lboshell" type="translation" date="13.11.2003"/> +<file name="reference/filesystem/functions/pathinfo.xml" person="lboshell" type="translation" date="13.11.2003"/> +<file name="reference/filesystem/functions/realpath.xml" person="lboshell" type="translation" date="13.11.2003"/> +<file name="reference/filesystem/functions/tmpfile.xml" person="lboshell" type="translation" date="13.11.2003"/> </work-in-progress> </translation> Index: phpdoc-es/reference/filesystem/functions/disk-free-space.xml +++ phpdoc-es/reference/filesystem/functions/disk-free-space.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.86 --> <refentry id="function.disk-free-space"> <refnamediv> <refname>disk_free_space</refname> <refpurpose>Devuelve el espacio disponible en el directorio</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>float</type><methodname>disk_free_space</methodname> <methodparam><type>string</type><parameter>directorio</parameter></methodparam> </methodsynopsis> <para> Dada una cadena que contiene un directorio, esta función devolverá el número de bytes disponibles en el sistema de archivos o partición de disco correspondiente. </para> <para> <example> <title>Ejemplo de <function>disk_free_space</function></title> <programlisting role="php"> <![CDATA[ <?php // $df contiene el numero de bytes disponibles en "/" $df = disk_free_space("/"); ?> ]]> </programlisting> </example> </para> ¬e.no-remote; <simpara> Vea también <function>disk_total_space</function> </simpara> </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/disk-total-space.xml +++ phpdoc-es/reference/filesystem/functions/disk-total-space.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.64 --> <refentry id="function.disk-total-space"> <refnamediv> <refname>disk_total_space</refname> <refpurpose>Devuelve el tamaño total de un directorio</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>float</type><methodname>disk_total_space</methodname> <methodparam><type>string</type><parameter>directorio</parameter></methodparam> </methodsynopsis> <para> Dada una cadena que contiene un directorio, esta función devolverá el número total de bytes en el sistema de archivos o partición de disco correspondiente. </para> <para> <example> <title>Ejemplo de <function>disk_total_space</function></title> <programlisting role="php"> <![CDATA[ <?php // $df contiene el numero total de bytes disponible en "/" $df = disk_total_space("/"); ?> ]]> </programlisting> </example> </para> ¬e.no-remote; <simpara> Vea también <function>disk_free_space</function> </simpara> </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/fflush.xml +++ phpdoc-es/reference/filesystem/functions/fflush.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.43 --> <refentry id="function.fflush"> <refnamediv> <refname>fflush</refname> <refpurpose>Vacía la salida hacia un archivo</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>fflush</methodname> <methodparam><type>resource</type><parameter>gestor</parameter></methodparam> </methodsynopsis> <para> Esta función obliga a que se produzca la escritura de la salida acumulada en búfer al recurso apuntado por el gestor de archivo <parameter>gestor</parameter>. Devuelve &true; si tiene éxito, &false; de lo contrario. </para> <para> El apuntador de archivo debe ser válido, y debe apuntar a un archivo abierto satisfactoriamente por <function>fopen</function>, <function>popen</function>, o <function>fsockopen</function>. </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/file-get-contents.xml +++ phpdoc-es/reference/filesystem/functions/file-get-contents.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.10 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.130 --> <refentry id="function.file-get-contents"> <refnamediv> <refname>file_get_contents</refname> <refpurpose>Lee un archivo entero en una cadena</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>file_get_contents</methodname> <methodparam><type>string</type><parameter>nombre_archivo</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>usar_ruta_inclusion</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>contexto</parameter></methodparam> </methodsynopsis> <para> Función idéntica a <function>file</function>, con la excepción de que <function>file_get_contents</function> devuelve el archivo en una cadena. </para> <para> <function>file_get_contents</function> es el modo preferido para leer los contenidos de un archivo en una cadena. Esta función usa las técnicas de asignación de memoria que soporte su SO para incrementar su rendimiento. </para> ¬e.bin-safe; &tip.fopen-wrapper; <note> <simpara> El soporte para contexto fue añadido en <literal>PHP 5.0.0</literal>. </simpara> </note> <simpara> Vea también: <function>fgets</function>, <function>file</function>, <function>fread</function>, <function>include</function>, y <function>readfile</function>. </simpara> </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/file-put-contents.xml +++ phpdoc-es/reference/filesystem/functions/file-put-contents.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: lboshell Status: ready --> <refentry id="function.file-put-contents"> <refnamediv> <refname>file_put_contents</refname> <refpurpose>Escribir una cadena sobre un archivo</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>int</type><methodname>file_put_contents</methodname> <methodparam><type>string</type><parameter>nombre_archivo</parameter></methodparam> <methodparam><type>string</type><parameter>datos</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>banderas</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>contexto</parameter></methodparam> </methodsynopsis> <simpara> Idéntico a llamar <function>fopen</function>, <function>fwrite</function>, y <function>fclose</function> sucesivamente. La función devuelve la cantidad de bytes que fueron escritos en el archivo. </simpara> <simpara> <parameter>banderas</parameter> puede recibir <constant>FILE_USE_INCLUDE_PATH</constant> o <constant>FILE_APPEND</constant>, sin embargo, la opción <constant>FILE_USE_INCLUDE_PATH</constant> debe ser usada con precaución. </simpara> ¬e.bin-safe; &tip.fopen-wrapper; <simpara> Vea también: <function>fopen</function>, <function>fwrite</function>, <function>fclose</function>, y <function>file_get_contents</function>. </simpara> </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/fnmatch.xml +++ phpdoc-es/reference/filesystem/functions/fnmatch.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <refentry id="function.fnmatch"> <refnamediv> <refname>fnmatch</refname> <refpurpose>Comparar un nombre de archivo contra un patrón</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>fnmatch</methodname> <methodparam><type>string</type><parameter>patron</parameter></methodparam> <methodparam><type>string</type><parameter>cadena</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>banderas</parameter></methodparam> </methodsynopsis> <para> <function>fnmatch</function> verifica si la <parameter>cadena</parameter> pasada coincide con el comodín de intérprete de comandos dado, <parameter>patron</parameter>. </para> <para> Esto es especialmente útil para nombres de archivos, pero también puede ser usado sobre cadenas comunes. El usuario promedio puede encontrarse familiarizado con patrones de intérprete de comandos, o, por lo menos en su forma más simple, con los comodines <literal>'?'</literal> y <literal>'*'</literal>, así que el uso de <function>fnmatch</function> en lugar de <function>ereg</function> o <function>preg_match</function> para el procesamiento de expresiones de búsqueda puede ser mucho más conveniente para usuarios no-programadores. </para> <example> <title> Verificar un nombre de color contra un patrón de comodines de intérprete de comandos. </title> <programlisting role="php"> <![CDATA[ <?php if(fnmatch("*gr[ae]y", $color)) { echo "alguna forma de gris (gray) ..."; } ?> ]]> </programlisting> </example> <para> Vea también <function>glob</function>, <function>ereg</function>, <function>preg_match</function> y la página man Unix sobre <literal>fnmatch(3)</literal> para consultar los nombres de banderas (mientras no estén documentados aquí<!-- TODO hartmut -->). </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/fstat.xml +++ phpdoc-es/reference/filesystem/functions/fstat.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.8 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.24 --> <refentry id="function.fstat"> <refnamediv> <refname>fstat</refname> <refpurpose>Obtiene información sobre un archivo usando un apuntador de archivo abierto</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>fstat</methodname> <methodparam><type>resource</type><parameter>gestor</parameter></methodparam> </methodsynopsis> <para> Reúne las estadísticas del archivo abierto por el apuntador a archivo <parameter>gestor</parameter>. Esta función es similar a la función <function>stat</function>, excepto que opera sobre un apuntador de archivo abierto en lugar de un nombre de archivo. </para> <para> Devuelve una matriz con las estadísticas del archivo; el formato de la matriz es descrito en la página del manual sobre <function>stat</function>. </para> <para> <example> <title>Ejemplo de <function>fstat</function></title> <programlisting role="php"> <![CDATA[ <?php // abrir un archivo $da = fopen("/etc/passwd", "r"); // reunir estadisticas $fstat = fstat($da); // cerrar el archivo fclose($da); // imprimir solo la parte asociativa print_r(array_slice($fstat, 13)); ?> ]]> </programlisting> <para> esto producirá : </para> <screen> <![CDATA[ Array ( [dev] => 771 [ino] => 488704 [mode] => 33188 [nlink] => 1 [uid] => 0 [gid] => 0 [rdev] => 0 [size] => 1114 [atime] => 1061067181 [mtime] => 1056136526 [ctime] => 1056136526 [blksize] => 4096 [blocks] => 8 ) ]]> </screen> </example> </para> ¬e.clearstatcache; ¬e.no-remote; </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/ftruncate.xml +++ phpdoc-es/reference/filesystem/functions/ftruncate.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.6 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.14 --> <refentry id="function.ftruncate"> <refnamediv> <refname>ftruncate</refname> <refpurpose>Trunca un archivo a la longitud dada</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>ftruncate</methodname> <methodparam><type>resource</type><parameter>gestor</parameter></methodparam> <methodparam><type>int</type><parameter>tamanyo</parameter></methodparam> </methodsynopsis> <para> Toma el apuntador de archivo, <parameter>gestor</parameter>, y trunca el archivo a la longitud <parameter>tamanyo</parameter>. &return.success; </para> <note> <para> En versiones anteriores a PHP 4.3.3, <function>ftruncate</function> devuelve un valor <type>integer</type> de 1 cuando tiene éxito, en lugar del valor <type>boolean</type> &true;. </para> </note> <para> Vea también <function>fopen</function> y <function>fseek</function>. </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/is-uploaded-file.xml +++ phpdoc-es/reference/filesystem/functions/is-uploaded-file.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.39 --> <refentry id="function.is-uploaded-file"> <refnamediv> <refname>is_uploaded_file</refname> <refpurpose>Indica si un archivo fue cargado a través de HTTP POST</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>is_uploaded_file</methodname> <methodparam><type>string</type><parameter>nombre_archivo</parameter></methodparam> </methodsynopsis> <para> Devuelve &true; si el archivo dado por <parameter>nombre_archivo</parameter> fue cargado a través de HTTP POST. Esto es útil para ayudar a verificar que un usuario malicioso no ha intentado engañar al script haciéndole trabajar sobre archivos con los que no debería trabajar--por ejemplo, <filename>/etc/passwd</filename>. </para> <para> Este tipo de chequeo es especialmente importante si existe alguna posibilidad de que cualquier cosa realizada con archivos cargados pueda revelar sus contenidos al usuario, o incluso a otros usuarios en el mismo sistema. </para> <para> <function>is_uploaded_file</function> se encuentra disponible únicamente en versiones de PHP 3 superiores a PHP 3.0.16, y en versiones de PHP 4 superiores a 4.0.2. Si está atrapado usando una versión anterior, puede usar la siguiente función para protegerse: <note> <para> El siguiente ejemplo <emphasis>no</emphasis> trabajará con versiones de PHP 4 superiores a 4.0.2. Depende en la funcionalidad interna de PHP que fue modificada luego de esa versión. </para> </note> <programlisting role="php"> <![CDATA[ <?php /* Prueba de usuario para verificar un archivo cargado. */ function is_uploaded_file($nombre_archivo) { if (!$archivo_tmp = get_cfg_var('upload_tmp_dir')) { $archivo_tmp = dirname(tempnam('', '')); } $archivo_tmp .= '/' . basename($nombre_archivo); /* El usuario puede tener una barra final en php.ini... */ return (ereg_replace('/+', '/', $archivo_tmp) == $nombre_archivo); } /* Asi es como se usa, ya que tampoco se cuenta con * move_uploaded_file() en estas versiones antiguas: */ if (is_uploaded_file($HTTP_POST_FILES['archivo_de_usuario'])) { copy($HTTP_POST_FILES['archivo_de_usuario'], "/lugar/a/colocar/el/archivo/cargado"); } else { echo "Posible ataque de archivo entrante: nombre de archivo '$HTTP_POST_FILES[archivo_de_usuario]'."; } ?> ]]> </programlisting> </para> <para> Vea también <function>move_uploaded_file</function>, y la sección <link linkend="features.file-upload">Gestión de carga de archivos</link> para un ejempo de uso sencillo. </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:"../../../../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 -->
Index: phpdoc-es/translation.xml diff -u phpdoc-es/translation.xml:1.84 phpdoc-es/translation.xml:1.85 --- phpdoc-es/translation.xml:1.84 Tue Nov 11 22:25:51 2003 +++ phpdoc-es/translation.xml Thu Nov 13 01:38:52 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.84 $ --> +<!-- $Revision: 1.85 $ --> <!DOCTYPE translation SYSTEM "../entities/translation.dtd"> <translation> @@ -44,14 +44,10 @@ <file name="reference/dio/functions/dio-tcsetattr.xml" person="javi" type="translation" date="09.11.2003"/> <file name="reference/dio/functions/dio-truncate.xml" person="javi" type="translation" date="09.11.2003"/> <file name="reference/dio/functions/dio-write.xml" person="javi" type="translation" date="09.11.2003"/> -<file name="reference/filesystem/functions/disk-free-space.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/disk-total-space.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/fflush.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/file-get-contents.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/file-put-contents.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/fnmatch.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/fstat.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/ftruncate.xml" person="lboshell" type="translation" date="11.11.2003"/> -<file name="reference/filesystem/functions/is-uploaded-file.xml" person="lboshell" type="translation" date="11.11.2003"/> +<file name="reference/filesystem/functions/is-writable.xml" person="lboshell" type="translation" date="13.11.2003"/> +<file name="reference/filesystem/functions/parse-ini-file.xml" person="lboshell" type="translation" date="13.11.2003"/> +<file name="reference/filesystem/functions/pathinfo.xml" person="lboshell" type="translation" date="13.11.2003"/> +<file name="reference/filesystem/functions/realpath.xml" person="lboshell" type="translation" date="13.11.2003"/> +<file name="reference/filesystem/functions/tmpfile.xml" person="lboshell" type="translation" date="13.11.2003"/> </work-in-progress> </translation> Index: phpdoc-es/reference/filesystem/functions/disk-free-space.xml +++ phpdoc-es/reference/filesystem/functions/disk-free-space.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.86 --> <refentry id="function.disk-free-space"> <refnamediv> <refname>disk_free_space</refname> <refpurpose>Devuelve el espacio disponible en el directorio</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>float</type><methodname>disk_free_space</methodname> <methodparam><type>string</type><parameter>directorio</parameter></methodparam> </methodsynopsis> <para> Dada una cadena que contiene un directorio, esta función devolverá el número de bytes disponibles en el sistema de archivos o partición de disco correspondiente. </para> <para> <example> <title>Ejemplo de <function>disk_free_space</function></title> <programlisting role="php"> <![CDATA[ <?php // $df contiene el numero de bytes disponibles en "/" $df = disk_free_space("/"); ?> ]]> </programlisting> </example> </para> ¬e.no-remote; <simpara> Vea también <function>disk_total_space</function> </simpara> </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/disk-total-space.xml +++ phpdoc-es/reference/filesystem/functions/disk-total-space.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.64 --> <refentry id="function.disk-total-space"> <refnamediv> <refname>disk_total_space</refname> <refpurpose>Devuelve el tamaño total de un directorio</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>float</type><methodname>disk_total_space</methodname> <methodparam><type>string</type><parameter>directorio</parameter></methodparam> </methodsynopsis> <para> Dada una cadena que contiene un directorio, esta función devolverá el número total de bytes en el sistema de archivos o partición de disco correspondiente. </para> <para> <example> <title>Ejemplo de <function>disk_total_space</function></title> <programlisting role="php"> <![CDATA[ <?php // $df contiene el numero total de bytes disponible en "/" $df = disk_total_space("/"); ?> ]]> </programlisting> </example> </para> ¬e.no-remote; <simpara> Vea también <function>disk_free_space</function> </simpara> </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/fflush.xml +++ phpdoc-es/reference/filesystem/functions/fflush.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.43 --> <refentry id="function.fflush"> <refnamediv> <refname>fflush</refname> <refpurpose>Vacía la salida hacia un archivo</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>fflush</methodname> <methodparam><type>resource</type><parameter>gestor</parameter></methodparam> </methodsynopsis> <para> Esta función obliga a que se produzca la escritura de la salida acumulada en búfer al recurso apuntado por el gestor de archivo <parameter>gestor</parameter>. Devuelve &true; si tiene éxito, &false; de lo contrario. </para> <para> El apuntador de archivo debe ser válido, y debe apuntar a un archivo abierto satisfactoriamente por <function>fopen</function>, <function>popen</function>, o <function>fsockopen</function>. </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/file-get-contents.xml +++ phpdoc-es/reference/filesystem/functions/file-get-contents.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.10 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.130 --> <refentry id="function.file-get-contents"> <refnamediv> <refname>file_get_contents</refname> <refpurpose>Lee un archivo entero en una cadena</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>file_get_contents</methodname> <methodparam><type>string</type><parameter>nombre_archivo</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>usar_ruta_inclusion</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>contexto</parameter></methodparam> </methodsynopsis> <para> Función idéntica a <function>file</function>, con la excepción de que <function>file_get_contents</function> devuelve el archivo en una cadena. </para> <para> <function>file_get_contents</function> es el modo preferido para leer los contenidos de un archivo en una cadena. Esta función usa las técnicas de asignación de memoria que soporte su SO para incrementar su rendimiento. </para> ¬e.bin-safe; &tip.fopen-wrapper; <note> <simpara> El soporte para contexto fue añadido en <literal>PHP 5.0.0</literal>. </simpara> </note> <simpara> Vea también: <function>fgets</function>, <function>file</function>, <function>fread</function>, <function>include</function>, y <function>readfile</function>. </simpara> </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/file-put-contents.xml +++ phpdoc-es/reference/filesystem/functions/file-put-contents.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: lboshell Status: ready --> <refentry id="function.file-put-contents"> <refnamediv> <refname>file_put_contents</refname> <refpurpose>Escribir una cadena sobre un archivo</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>int</type><methodname>file_put_contents</methodname> <methodparam><type>string</type><parameter>nombre_archivo</parameter></methodparam> <methodparam><type>string</type><parameter>datos</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>banderas</parameter></methodparam> <methodparam choice="opt"><type>resource</type><parameter>contexto</parameter></methodparam> </methodsynopsis> <simpara> Idéntico a llamar <function>fopen</function>, <function>fwrite</function>, y <function>fclose</function> sucesivamente. La función devuelve la cantidad de bytes que fueron escritos en el archivo. </simpara> <simpara> <parameter>banderas</parameter> puede recibir <constant>FILE_USE_INCLUDE_PATH</constant> o <constant>FILE_APPEND</constant>, sin embargo, la opción <constant>FILE_USE_INCLUDE_PATH</constant> debe ser usada con precaución. </simpara> ¬e.bin-safe; &tip.fopen-wrapper; <simpara> Vea también: <function>fopen</function>, <function>fwrite</function>, <function>fclose</function>, y <function>file_get_contents</function>. </simpara> </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/fnmatch.xml +++ phpdoc-es/reference/filesystem/functions/fnmatch.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <refentry id="function.fnmatch"> <refnamediv> <refname>fnmatch</refname> <refpurpose>Comparar un nombre de archivo contra un patrón</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>fnmatch</methodname> <methodparam><type>string</type><parameter>patron</parameter></methodparam> <methodparam><type>string</type><parameter>cadena</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>banderas</parameter></methodparam> </methodsynopsis> <para> <function>fnmatch</function> verifica si la <parameter>cadena</parameter> pasada coincide con el comodín de intérprete de comandos dado, <parameter>patron</parameter>. </para> <para> Esto es especialmente útil para nombres de archivos, pero también puede ser usado sobre cadenas comunes. El usuario promedio puede encontrarse familiarizado con patrones de intérprete de comandos, o, por lo menos en su forma más simple, con los comodines <literal>'?'</literal> y <literal>'*'</literal>, así que el uso de <function>fnmatch</function> en lugar de <function>ereg</function> o <function>preg_match</function> para el procesamiento de expresiones de búsqueda puede ser mucho más conveniente para usuarios no-programadores. </para> <example> <title> Verificar un nombre de color contra un patrón de comodines de intérprete de comandos. </title> <programlisting role="php"> <![CDATA[ <?php if(fnmatch("*gr[ae]y", $color)) { echo "alguna forma de gris (gray) ..."; } ?> ]]> </programlisting> </example> <para> Vea también <function>glob</function>, <function>ereg</function>, <function>preg_match</function> y la página man Unix sobre <literal>fnmatch(3)</literal> para consultar los nombres de banderas (mientras no estén documentados aquí<!-- TODO hartmut -->). </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/fstat.xml +++ phpdoc-es/reference/filesystem/functions/fstat.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.8 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.24 --> <refentry id="function.fstat"> <refnamediv> <refname>fstat</refname> <refpurpose>Obtiene información sobre un archivo usando un apuntador de archivo abierto</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>fstat</methodname> <methodparam><type>resource</type><parameter>gestor</parameter></methodparam> </methodsynopsis> <para> Reúne las estadísticas del archivo abierto por el apuntador a archivo <parameter>gestor</parameter>. Esta función es similar a la función <function>stat</function>, excepto que opera sobre un apuntador de archivo abierto en lugar de un nombre de archivo. </para> <para> Devuelve una matriz con las estadísticas del archivo; el formato de la matriz es descrito en la página del manual sobre <function>stat</function>. </para> <para> <example> <title>Ejemplo de <function>fstat</function></title> <programlisting role="php"> <![CDATA[ <?php // abrir un archivo $da = fopen("/etc/passwd", "r"); // reunir estadisticas $fstat = fstat($da); // cerrar el archivo fclose($da); // imprimir solo la parte asociativa print_r(array_slice($fstat, 13)); ?> ]]> </programlisting> <para> esto producirá : </para> <screen> <![CDATA[ Array ( [dev] => 771 [ino] => 488704 [mode] => 33188 [nlink] => 1 [uid] => 0 [gid] => 0 [rdev] => 0 [size] => 1114 [atime] => 1061067181 [mtime] => 1056136526 [ctime] => 1056136526 [blksize] => 4096 [blocks] => 8 ) ]]> </screen> </example> </para> ¬e.clearstatcache; ¬e.no-remote; </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/ftruncate.xml +++ phpdoc-es/reference/filesystem/functions/ftruncate.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.6 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.14 --> <refentry id="function.ftruncate"> <refnamediv> <refname>ftruncate</refname> <refpurpose>Trunca un archivo a la longitud dada</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>ftruncate</methodname> <methodparam><type>resource</type><parameter>gestor</parameter></methodparam> <methodparam><type>int</type><parameter>tamanyo</parameter></methodparam> </methodsynopsis> <para> Toma el apuntador de archivo, <parameter>gestor</parameter>, y trunca el archivo a la longitud <parameter>tamanyo</parameter>. &return.success; </para> <note> <para> En versiones anteriores a PHP 4.3.3, <function>ftruncate</function> devuelve un valor <type>integer</type> de 1 cuando tiene éxito, en lugar del valor <type>boolean</type> &true;. </para> </note> <para> Vea también <function>fopen</function> y <function>fseek</function>. </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:"../../../../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 --> Index: phpdoc-es/reference/filesystem/functions/is-uploaded-file.xml +++ phpdoc-es/reference/filesystem/functions/is-uploaded-file.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.39 --> <refentry id="function.is-uploaded-file"> <refnamediv> <refname>is_uploaded_file</refname> <refpurpose>Indica si un archivo fue cargado a través de HTTP POST</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>is_uploaded_file</methodname> <methodparam><type>string</type><parameter>nombre_archivo</parameter></methodparam> </methodsynopsis> <para> Devuelve &true; si el archivo dado por <parameter>nombre_archivo</parameter> fue cargado a través de HTTP POST. Esto es útil para ayudar a verificar que un usuario malicioso no ha intentado engañar al script haciéndole trabajar sobre archivos con los que no debería trabajar--por ejemplo, <filename>/etc/passwd</filename>. </para> <para> Este tipo de chequeo es especialmente importante si existe alguna posibilidad de que cualquier cosa realizada con archivos cargados pueda revelar sus contenidos al usuario, o incluso a otros usuarios en el mismo sistema. </para> <para> <function>is_uploaded_file</function> se encuentra disponible únicamente en versiones de PHP 3 superiores a PHP 3.0.16, y en versiones de PHP 4 superiores a 4.0.2. Si está atrapado usando una versión anterior, puede usar la siguiente función para protegerse: <note> <para> El siguiente ejemplo <emphasis>no</emphasis> trabajará con versiones de PHP 4 superiores a 4.0.2. Depende en la funcionalidad interna de PHP que fue modificada luego de esa versión. </para> </note> <programlisting role="php"> <![CDATA[ <?php /* Prueba de usuario para verificar un archivo cargado. */ function is_uploaded_file($nombre_archivo) { if (!$archivo_tmp = get_cfg_var('upload_tmp_dir')) { $archivo_tmp = dirname(tempnam('', '')); } $archivo_tmp .= '/' . basename($nombre_archivo); /* El usuario puede tener una barra final en php.ini... */ return (ereg_replace('/+', '/', $archivo_tmp) == $nombre_archivo); } /* Asi es como se usa, ya que tampoco se cuenta con * move_uploaded_file() en estas versiones antiguas: */ if (is_uploaded_file($HTTP_POST_FILES['archivo_de_usuario'])) { copy($HTTP_POST_FILES['archivo_de_usuario'], "/lugar/a/colocar/el/archivo/cargado"); } else { echo "Posible ataque de archivo entrante: nombre de archivo '$HTTP_POST_FILES[archivo_de_usuario]'."; } ?> ]]> </programlisting> </para> <para> Vea también <function>move_uploaded_file</function>, y la sección <link linkend="features.file-upload">Gestión de carga de archivos</link> para un ejempo de uso sencillo. </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:"../../../../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 -->