vrana           Thu Mar  9 14:15:41 2006 UTC

  Added files:                 
    /phpdoc/en/reference/fileinfo       .cvsignore configure.xml 
                                        constants.xml reference.xml 
    /phpdoc/en/reference/fileinfo/functions     finfo-buffer.xml 
                                                finfo-close.xml 
                                                finfo-file.xml 
                                                finfo-open.xml 
                                                finfo-set-flags.xml 
  Log:
  Document fileinfo
  
http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/fileinfo/.cvsignore?view=markup&rev=1.1
Index: phpdoc/en/reference/fileinfo/.cvsignore
+++ phpdoc/en/reference/fileinfo/.cvsignore
functions.xml

http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/fileinfo/configure.xml?view=markup&rev=1.1
Index: phpdoc/en/reference/fileinfo/configure.xml
+++ phpdoc/en/reference/fileinfo/configure.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<section id="fileinfo.installation">
 &reftitle.install;
 <para>
  A short installation note: just type
  <screen>
$ pear install fileinfo
  </screen>
  in your console. 
 </para>
</section>


<!-- 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
-->

http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/fileinfo/constants.xml?view=markup&rev=1.1
Index: phpdoc/en/reference/fileinfo/constants.xml
+++ phpdoc/en/reference/fileinfo/constants.xml
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.3. Found in /scripts directory of phpdoc. -->
<section id="fileinfo.constants">
 &reftitle.constants;
 &extension.constants;
 <variablelist>
  <varlistentry>
   <term>
    <constant>FILEINFO_NONE</constant>
     (<type>integer</type>)
   </term>
   <listitem>
    <simpara>
     No special handling.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>FILEINFO_SYMLINK</constant>
     (<type>integer</type>)
   </term>
   <listitem>
    <simpara>
     Follow symlinks.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>FILEINFO_MIME</constant>
     (<type>integer</type>)
   </term>
   <listitem>
    <simpara>
     Return a mime string, instead of a textual description.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>FILEINFO_COMPRESS</constant>
     (<type>integer</type>)
   </term>
   <listitem>
    <simpara>
     Decompress compressed files.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>FILEINFO_DEVICES</constant>
     (<type>integer</type>)
   </term>
   <listitem>
    <simpara>
     Look at the contents of blocks or character special devices.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>FILEINFO_CONTINUE</constant>
     (<type>integer</type>)
   </term>
   <listitem>
    <simpara>
     Return all matches, not just the first.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>FILEINFO_PRESERVE_ATIME</constant>
     (<type>integer</type>)
   </term>
   <listitem>
    <simpara>
     If possible preserve the original access time.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>FILEINFO_RAW</constant>
     (<type>integer</type>)
   </term>
   <listitem>
    <simpara>
     Don't translate unprintable characters to a <literal>\ooo</literal> octal
     representation.
    </simpara>
   </listitem>
  </varlistentry>
 </variablelist>
</section>

<!-- 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
-->

http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/fileinfo/reference.xml?view=markup&rev=1.1
Index: phpdoc/en/reference/fileinfo/reference.xml
+++ phpdoc/en/reference/fileinfo/reference.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Purpose: fileprocess.file -->
<!-- Membership: pecl -->
<!-- Generated by xml_proto.php v2.3. Found in /scripts directory of phpdoc. -->
<reference id="ref.fileinfo">
 <title>Fileinfo Functions</title>
 <titleabbrev>Fileinfo</titleabbrev>

 <partintro>
  <section id="fileinfo.intro">
   &reftitle.intro;
   <para>
    The functions in this module try to guess the content type
     and encoding of a file by looking for certain 
     <emphasis>magic</emphasis> byte sequences at specific
     positions within the file. While this is not a bullet proof
     approach the heuristics used do a very good job.
   </para>
  </section>
  
  <section id="fileinfo.requirements">
   &reftitle.required;
   <para>
    <literal>magic_open</literal> library is needed to build this extension.
   </para>
  </section>

  <!-- Information found in configure.xml -->
  &reference.fileinfo.configure;

  <section id="fileinfo.configuration">
   &reftitle.runtime;
   &no.config;
  </section>

  <section id="fileinfo.resources">
   &reftitle.resources;
   <para>
    There is one resource used in Fileinfo extension: a magic database
    descriptor returned by <function>finfo_open</function>.
   </para>
  </section>
  <!-- Information found in constants.xml -->
  &reference.fileinfo.constants;
 </partintro>
 &reference.fileinfo.functions;
</reference>

<!-- 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
-->

http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/fileinfo/functions/finfo-buffer.xml?view=markup&rev=1.1
Index: phpdoc/en/reference/fileinfo/functions/finfo-buffer.xml
+++ phpdoc/en/reference/fileinfo/functions/finfo-buffer.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.3. Found in /scripts directory of phpdoc. -->
<refentry id="function.finfo-buffer">
 <refnamediv>
  <refname>finfo_buffer</refname>
  <refpurpose>Return infromation about a string buffer</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>string</type><methodname>finfo_buffer</methodname>
   <methodparam><type>resource</type><parameter>finfo</parameter></methodparam>
   <methodparam><type>string</type><parameter>string</parameter></methodparam>
   <methodparam 
choice="opt"><type>int</type><parameter>options</parameter></methodparam>
  </methodsynopsis>
  <classsynopsis>
   <ooclass><classname>finfo</classname></ooclass>
   <methodsynopsis>
    <type>string</type><methodname>buffer</methodname>
    <methodparam><type>string</type><parameter>string</parameter></methodparam>
    <methodparam 
choice="opt"><type>int</type><parameter>options</parameter></methodparam>
   </methodsynopsis>
  </classsynopsis>

  <para>
   This function is used to get information about binary data in a string.
  </para>

 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>finfo</parameter></term>
     <listitem>
      <para>
       Fileinfo resource returned by <function>finfo_open</function>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>string</parameter></term>
     <listitem>
      <para>
       Content of a file to be checked.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>options</parameter></term>
     <listitem>
      <para>
       One or disjunction of more <link linkend="fileinfo.constants">Fileinfo
       constants</link>.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns a textual description of the <parameter>string</parameter>
   argument, or &false; if an error occurred.
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title>A <function>finfo_buffer</function> example</title>
    <programlisting role="php">
<![CDATA[
<?php
$finfo = new finfo(FILEINFO_MIME);
echo $finfo->buffer($_POST["script"]) . "\n";
?>
]]>
    </programlisting>
    &example.outputs.similar;
    <screen>
<![CDATA[
application/x-sh
]]>
    </screen>
   </example>
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>finfo_file</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:"../../../../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
-->

http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/fileinfo/functions/finfo-close.xml?view=markup&rev=1.1
Index: phpdoc/en/reference/fileinfo/functions/finfo-close.xml
+++ phpdoc/en/reference/fileinfo/functions/finfo-close.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.3. Found in /scripts directory of phpdoc. -->
<refentry id="function.finfo-close">
 <refnamediv>
  <refname>finfo_close</refname>
  <refpurpose>Close fileinfo resource</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>finfo_close</methodname>
   <methodparam><type>resource</type><parameter>finfo</parameter></methodparam>
  </methodsynopsis>

  <para>
   This function closes the resource opened by <function>finfo_open</function>.
  </para>

 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>finfo</parameter></term>
     <listitem>
      <para>
       Fileinfo resource returned by <function>finfo_open</function>.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &return.success;
  </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
-->

http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/fileinfo/functions/finfo-file.xml?view=markup&rev=1.1
Index: phpdoc/en/reference/fileinfo/functions/finfo-file.xml
+++ phpdoc/en/reference/fileinfo/functions/finfo-file.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.3. Found in /scripts directory of phpdoc. -->
<refentry id="function.finfo-file">
 <refnamediv>
  <refname>finfo_file</refname>
  <refpurpose>Return information about a file</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>string</type><methodname>finfo_file</methodname>
   <methodparam><type>resource</type><parameter>finfo</parameter></methodparam>
   
<methodparam><type>string</type><parameter>file_name</parameter></methodparam>
   <methodparam 
choice="opt"><type>int</type><parameter>options</parameter></methodparam>
   <methodparam 
choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
  </methodsynopsis>
  <classsynopsis>
   <ooclass><classname>finfo</classname></ooclass>
   <methodsynopsis>
    <type>string</type><methodname>file</methodname>
    
<methodparam><type>string</type><parameter>file_name</parameter></methodparam>
    <methodparam 
choice="opt"><type>int</type><parameter>options</parameter></methodparam>
    <methodparam 
choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
   </methodsynopsis>
  </classsynopsis>

  <para>
   This function is used to get information about a file.
  </para>

 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>finfo</parameter></term>
     <listitem>
      <para>
       Fileinfo resource returned by <function>finfo_open</function>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>file_name</parameter></term>
     <listitem>
      <para>
       Name of a file to be checked.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>options</parameter></term>
     <listitem>
      <para>
       One or disjunction of more <link linkend="fileinfo.constants">Fileinfo
       constants</link>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>context</parameter></term>
     <listitem>
      <para>
       For a description of <literal>contexts</literal>, refer to <xref
       linkend="ref.stream"/>.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns a textual description of the contents of the
   <parameter>filename</parameter> argument, or &false; if an error occurred.
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title>A <function>finfo_file</function> example</title>
    <programlisting role="php">
<![CDATA[
<?php
$finfo = finfo_open(FILEINFO_MIME); // return mime type ala mimetype extension
foreach (glob("*") as $filename) {
    echo finfo_file($finfo, $filename) . "\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:"../../../../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
-->

http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/fileinfo/functions/finfo-open.xml?view=markup&rev=1.1
Index: phpdoc/en/reference/fileinfo/functions/finfo-open.xml
+++ phpdoc/en/reference/fileinfo/functions/finfo-open.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.3. Found in /scripts directory of phpdoc. -->
<refentry id="function.finfo-open">
 <refnamediv>
  <refname>finfo_open</refname>
  <refpurpose>Create a new fileinfo resource</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>resource</type><methodname>finfo_open</methodname>
   <methodparam 
choice="opt"><type>int</type><parameter>options</parameter></methodparam>
   <methodparam 
choice="opt"><type>string</type><parameter>arg</parameter></methodparam>
  </methodsynopsis>
  <classsynopsis>
   <ooclass><classname>finfo</classname></ooclass>
   <constructorsynopsis>
    <methodname>__construct</methodname>
    <methodparam 
choice="opt"><type>int</type><parameter>options</parameter></methodparam>
    <methodparam 
choice="opt"><type>string</type><parameter>magic_file</parameter></methodparam>
   </constructorsynopsis>
  </classsynopsis>

  <para>
   This function opens a magic database and returns its resource.
  </para>

 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>options</parameter></term>
     <listitem>
      <para>
       One or disjunction of more <link linkend="fileinfo.constants">Fileinfo
       constants</link>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>magic_file</parameter></term>
     <listitem>
      <para>
       Name of a magic database file, usually something like
       <filename>/path/to/magic.mime</filename>. If not specified,
       <literal>MAGIC</literal> environment variable is used. If this variable
       is not set neither, <filename>/usr/share/misc/magic</filename> is used.
       <literal>.mime</literal> and/or <literal>.mgc</literal> is added if
       appropriate.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns a magic database resource on success or &false; on failure.
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>finfo_close</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:"../../../../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
-->

http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/fileinfo/functions/finfo-set-flags.xml?view=markup&rev=1.1
Index: phpdoc/en/reference/fileinfo/functions/finfo-set-flags.xml
+++ phpdoc/en/reference/fileinfo/functions/finfo-set-flags.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.3. Found in /scripts directory of phpdoc. -->
<refentry id="function.finfo-set-flags">
 <refnamediv>
  <refname>finfo_set_flags</refname>
  <refpurpose>Set libmagic configuration options</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>finfo_set_flags</methodname>
   <methodparam><type>resource</type><parameter>finfo</parameter></methodparam>
   <methodparam><type>int</type><parameter>options</parameter></methodparam>
  </methodsynopsis>
  <classsynopsis>
   <ooclass><classname>finfo</classname></ooclass>
   <methodsynopsis>
    <type>bool</type><methodname>set_flags</methodname>
    <methodparam><type>int</type><parameter>options</parameter></methodparam>
   </methodsynopsis>
  </classsynopsis>

  <para>
   This function sets various Fileinfo options. Options can be set also
   directly in <function>finfo_open</function> or other Fileinfo functions.
  </para>

 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>finfo</parameter></term>
     <listitem>
      <para>
       Fileinfo resource returned by <function>finfo_open</function>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>options</parameter></term>
     <listitem>
      <para>
       One or disjunction of more <link linkend="fileinfo.constants">Fileinfo
       constants</link>.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &return.success;
  </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
-->

Reply via email to