cvs: phpdoc /en/reference/ssh2/functions ssh2-sftp-mkdir.xml ssh2-sftp-readlink.xml ssh2-sftp-realpath.xml ssh2-sftp-rmdir.xml ssh2-sftp-symlink.xml

From: Date: Thu, 30 Dec 2004 19:27:07 +0000
Subject: cvs: phpdoc /en/reference/ssh2/functions ssh2-sftp-mkdir.xml ssh2-sftp-readlink.xml ssh2-sftp-realpath.xml ssh2-sftp-rmdir.xml ssh2-sftp-symlink.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969365716@lists.php.net to get a copy of this message
pollita Thu Dec 30 14:27:07 2004 EDT Modified files: /phpdoc/en/reference/ssh2/functions ssh2-sftp-mkdir.xml ssh2-sftp-rmdir.xml ssh2-sftp-readlink.xml ssh2-sftp-symlink.xml ssh2-sftp-realpath.xml Log: Additional Documentation for: ssh2_sftp_mkdir() ssh2_sftp_rmdir() ssh2_sftp_readlink() ssh2_sftp_symlink() ssh2_sftp_realpath()

http://cvs.php.net/diff.php/phpdoc/en/reference/ssh2/functions/ssh2-sftp-mkdir.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc/en/reference/ssh2/functions/ssh2-sftp-mkdir.xml diff -u phpdoc/en/reference/ssh2/functions/ssh2-sftp-mkdir.xml:1.3 phpdoc/en/reference/ssh2/functions/ssh2-sftp-mkdir.xml:1.4 --- phpdoc/en/reference/ssh2/functions/ssh2-sftp-mkdir.xml:1.3 Wed Dec 29 11:06:48 2004 +++ phpdoc/en/reference/ssh2/functions/ssh2-sftp-mkdir.xml Thu Dec 30 14:27:07 2004 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. --> <refentry id="function.ssh2-sftp-mkdir"> <refnamediv> @@ -18,9 +18,36 @@ <methodparam choice="opt"><type>bool</type><parameter>recursive</parameter></methodparam> </methodsynopsis> - <para> - Creates a directory on the remote file server - </para> + <simpara> + Creates a directory on the remote file server with permissions set to + <parameter>mode</parameter>. If <parameter>recursive</parameter> is &true; + any parent directories required for <parameter>dirname</parameter> will + be automatically created as well. + This function is similar to using <function>mkdir</function> with the + <link linkend="wrappers.ssh2">ssh2.sftp://</link> wrapper. + </simpara> + + <example> + <title>Creating a directory on a remote server</title> + <programlisting role="php"> +<![CDATA[ +<?php +$connection = ssh2_connet('shell.example.com', 22); +ssh2_auth_password($connection, 'username', 'password'); +$sftp = ssh2_sftp($connection); + +ssh2_sftp_mkdir($sftp, '/home/username/newdir'); +/* Or: mkdir("ssh2.sftp://$sftp/home/username/newdir"); */ +?> +]]> + </programlisting> + </example> + + <simpara> + See Also: + <function>mkdir</function>, and + <function>ssh2_sftp_rmdir</function> + </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/ssh2/functions/ssh2-sftp-rmdir.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/ssh2/functions/ssh2-sftp-rmdir.xml diff -u phpdoc/en/reference/ssh2/functions/ssh2-sftp-rmdir.xml:1.1 phpdoc/en/reference/ssh2/functions/ssh2-sftp-rmdir.xml:1.2 --- phpdoc/en/reference/ssh2/functions/ssh2-sftp-rmdir.xml:1.1 Fri Dec 24 20:03:17 2004 +++ phpdoc/en/reference/ssh2/functions/ssh2-sftp-rmdir.xml Thu Dec 30 14:27:07 2004 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. --> <refentry id="function.ssh2-sftp-rmdir"> <refnamediv> @@ -13,12 +13,37 @@ <methodsynopsis> <type>bool</type><methodname>ssh2_sftp_rmdir</methodname> <methodparam><type>resource</type><parameter>sftp</parameter></methodparam> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> + <methodparam><type>string</type><parameter>dirname</parameter></methodparam> </methodsynopsis> - <para> - Removes a directory from the remote server's filesystem - </para> + <simpara> + Removes a directory from the remote file server. + This function is similar to using <function>rmdir</function> with the + <link linkend="wrappers.ssh2">ssh2.sftp://</link> wrapper. + </simpara> + + <example> + <title>Creating a directory on a remote server</title> + <programlisting role="php"> +<![CDATA[ +<?php +$connection = ssh2_connet('shell.example.com', 22); +ssh2_auth_password($connection, 'username', 'password'); +$sftp = ssh2_sftp($connection); + +ssh2_sftp_rmdir($sftp, '/home/username/deltodel'); +/* Or: rmdir("ssh2.sftp://$sftp/home/username/dirtodel"); */ +?> +]]> + </programlisting> + </example> + + <simpara> + See Also: + <function>rmdir</function>, and + <function>ssh2_sftp_mkdir</function> + </simpara> + </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/ssh2/functions/ssh2-sftp-readlink.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/ssh2/functions/ssh2-sftp-readlink.xml diff -u phpdoc/en/reference/ssh2/functions/ssh2-sftp-readlink.xml:1.1 phpdoc/en/reference/ssh2/functions/ssh2-sftp-readlink.xml:1.2 --- phpdoc/en/reference/ssh2/functions/ssh2-sftp-readlink.xml:1.1 Fri Dec 24 20:03:17 2004 +++ phpdoc/en/reference/ssh2/functions/ssh2-sftp-readlink.xml Thu Dec 30 14:27:07 2004 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. --> <refentry id="function.ssh2-sftp-readlink"> <refnamediv> @@ -16,9 +16,31 @@ <methodparam><type>string</type><parameter>link</parameter></methodparam> </methodsynopsis> - <para> + <simpara> Returns the target of a symbolic link. - </para> + </simpara> + + <example> + <title>Reading a symbolic link</title> + <programlisting role="php"> +<![CDATA[ +<?php +$connection = ssh2_connect('shell.example.com', 22); +ssh2_auth_password($connection, 'username', 'password'); +$sftp = ssh2_sftp($connection); + +$target = ssh2_sftp_readlink($sftp, '/tmp/mysql.sock'); +/* $target is now (e.g.): '/var/run/mysql.sock' */ +?> +]]> + </programlisting> + </example> + + <simpara> + See Also: + <function>readlink</function>, and + <function>ssh2_sftp_symlink</function> + </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/ssh2/functions/ssh2-sftp-symlink.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/ssh2/functions/ssh2-sftp-symlink.xml diff -u phpdoc/en/reference/ssh2/functions/ssh2-sftp-symlink.xml:1.1 phpdoc/en/reference/ssh2/functions/ssh2-sftp-symlink.xml:1.2 --- phpdoc/en/reference/ssh2/functions/ssh2-sftp-symlink.xml:1.1 Fri Dec 24 20:03:18 2004 +++ phpdoc/en/reference/ssh2/functions/ssh2-sftp-symlink.xml Thu Dec 30 14:27:07 2004 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. --> <refentry id="function.ssh2-sftp-symlink"> <refnamediv> @@ -17,9 +17,31 @@ <methodparam><type>string</type><parameter>link</parameter></methodparam> </methodsynopsis> - <para> - Creates a symbolic link on the remote filesystem - </para> + <simpara> + Creates a symbolic link named <parameter>link</parameter> on the remote filesystem + pointing to <parameter>target</parameter>. + </simpara> + + <example> + <title>Creating a symbolic link</title> + <programlisting role="php"> +<![CDATA[ +<?php +$connection = ssh2_connect('shell.example.com', 22); +ssh2_auth_password($connection, 'username', 'password'); +$sftp = ssh2_sftp($connection); + +ssh2_sftp_symlink($sftp, '/var/run/mysql.sock', '/tmp/mysql.sock'); +?> +]]> + </programlisting> + </example> + + <simpara> + See Also: + <function>symlink</function>, and + <function>ssh2_sftp_readlink</function> + </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc/en/reference/ssh2/functions/ssh2-sftp-realpath.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/ssh2/functions/ssh2-sftp-realpath.xml diff -u phpdoc/en/reference/ssh2/functions/ssh2-sftp-realpath.xml:1.1 phpdoc/en/reference/ssh2/functions/ssh2-sftp-realpath.xml:1.2 --- phpdoc/en/reference/ssh2/functions/ssh2-sftp-realpath.xml:1.1 Fri Dec 24 20:03:17 2004 +++ phpdoc/en/reference/ssh2/functions/ssh2-sftp-realpath.xml Thu Dec 30 14:27:07 2004 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. --> <refentry id="function.ssh2-sftp-realpath"> <refnamediv> @@ -16,10 +16,33 @@ <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> - <para> + <simpara> Translates <parameter>filename</parameter> into the effective real path on the remote filesystem. - </para> + </simpara> + + <example> + <title>Resolving a pathname</title> + <programlisting role="php"> +<![CDATA[ +<?php +$connection = ssh2_connect('shell.example.com', 22); +ssh2_auth_password($connection, 'username', 'password'); +$sftp = ssh2_sftp($connection); + +$realpath = ssh2_sftp_realpath($sftp, '/home/username/../../../..//./usr/../etc/passwd'); +/* $realpath is now: '/etc/passwd' */ +?> +]]> + </programlisting> + </example> + + <simpara> + See Also: + <function>realpath</function>, and + <function>ssh2_sftp_symlink</function> + <function>ssh2_sftp_readlink</function> + </simpara> </refsect1> </refentry>
« previous php.doc (#969365716) next »