php-doc-en/reference/ftp/functions/ftp-rawlist.xml
Jakub Vrana fa2e38785e Fix protos from sources
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@166167 c90b9560-bf6c-de11-be94-00142212c4b1
2004-08-12 18:12:00 +00:00

94 lines
2.7 KiB
XML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.2 -->
<refentry id="function.ftp-rawlist">
<refnamediv>
<refname>ftp_rawlist</refname>
<refpurpose>Returns a detailed list of files in the given directory</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>ftp_rawlist</methodname>
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>recursive</parameter></methodparam>
</methodsynopsis>
<para>
<function>ftp_rawlist</function> executes the FTP LIST command,
and returns the result as an array. Each array element corresponds
to one line of text. The output is not parsed in any way. The
system type identifier returned by <function>ftp_systype</function>
can be used to determine how the results should be interpreted.
</para>
<para>
Optional parameter <parameter>recursive</parameter> is available since PHP
4.3.0.
</para>
<para>
<example>
<title><function>ftp_rawlist</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
// set up basic connection
$conn_id = ftp_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// get the file list for /
$buff = ftp_rawlist($conn_id, '/');
// close the connection
ftp_close($conn_id);
// output the buffer
var_dump($buff);
?>
]]>
</programlisting>
<para>
    The above example will output something similar to:
    </para>
<screen>
<![CDATA[
array(3) {
[0]=>
string(65) "drwxr-x--- 3 vincent vincent 4096 Jul 12 12:16 public_ftp"
[1]=>
string(66) "drwxr-x--- 15 vincent vincent 4096 Nov 3 21:31 public_html"
[2]=>
string(73) "lrwxrwxrwx 1 vincent vincent 11 Jul 12 12:16 www -> public_html"
}
]]>
    </screen>
</example>
</para>
<para>
See also <function>ftp_nlist</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
-->