pollita         Thu Dec 30 00:35:30 2004 EDT

  Modified files:              
    /phpdoc/en/reference/ssh2/functions ssh2-sftp.xml 
                                        ssh2-sftp-stat.xml 
                                        ssh2-sftp-lstat.xml 
  Log:
  Additional Documentation:
  ssh2_sftp(), ssh2_sftp_stat(), ssh2_sftp_lstat()
  
  
http://cvs.php.net/diff.php/phpdoc/en/reference/ssh2/functions/ssh2-sftp.xml?r1=1.1&r2=1.2&ty=u
Index: phpdoc/en/reference/ssh2/functions/ssh2-sftp.xml
diff -u phpdoc/en/reference/ssh2/functions/ssh2-sftp.xml:1.1 
phpdoc/en/reference/ssh2/functions/ssh2-sftp.xml:1.2
--- phpdoc/en/reference/ssh2/functions/ssh2-sftp.xml:1.1        Fri Dec 24 
20:03:18 2004
+++ phpdoc/en/reference/ssh2/functions/ssh2-sftp.xml    Thu Dec 30 00:35:30 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">
    <refnamediv>
@@ -15,9 +15,37 @@
      
<methodparam><type>resource</type><parameter>session</parameter></methodparam>
     </methodsynopsis>
 
-    <para>
-     Request the SFTP subsystem from an already connected SSH2 server
-    </para>
+    <simpara>
+     Request the SFTP subsystem from an already connected SSH2 server.
+    </simpara>
+
+    <simpara>
+     This method returns an <literal>SSH2 SFTP</literal> resource for use with
+     all other ssh2_sftp_*() methods and the
+     <link linkend="wrappers.ssh2">ssh2.sftp://</link> fopen wrapper.
+    </simpara>
+
+    <example>
+     <title>Opening a file via SFTP</title>
+     <programlisting role="php">
+<![CDATA[
+<?php
+$connection = ssh2_connect('shell.example.com', 22);
+ssh2_auth_password($connection, 'username', 'password');
+
+$sftp = ssh2_sftp($connection);
+
+$stream = fopen("ssh2.sftp://$sftp/path/to/file";, 'r');
+?>
+]]>
+     </programlisting>
+    </example>
+
+    <simpara>
+     See Also:
+     <function>ssh2_scp_send</function>, and
+     <function>ssh2_scp_recv</function>
+    </simpara>
 
    </refsect1>
   </refentry>
http://cvs.php.net/diff.php/phpdoc/en/reference/ssh2/functions/ssh2-sftp-stat.xml?r1=1.1&r2=1.2&ty=u
Index: phpdoc/en/reference/ssh2/functions/ssh2-sftp-stat.xml
diff -u phpdoc/en/reference/ssh2/functions/ssh2-sftp-stat.xml:1.1 
phpdoc/en/reference/ssh2/functions/ssh2-sftp-stat.xml:1.2
--- phpdoc/en/reference/ssh2/functions/ssh2-sftp-stat.xml:1.1   Fri Dec 24 
20:03:17 2004
+++ phpdoc/en/reference/ssh2/functions/ssh2-sftp-stat.xml       Thu Dec 30 
00:35:30 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-stat">
    <refnamediv>
@@ -16,10 +16,42 @@
      <methodparam><type>string</type><parameter>path</parameter></methodparam>
     </methodsynopsis>
 
-    <para>
-     Stats a remote file.  If the file is a symbolic link, it follows the link
-     and stats its target.
-    </para>
+    <simpara>
+     Stats a file on the remote filesystem following any symbolic links.
+     This function is similar to using the <function>stat</function> function
+     with the <link linkend="wrappers.ssh2">ssh2.sftp://</link> wrapper in PHP5
+     and returns the same values.  See the documentation for
+     <function>stat</function> for details on the values which may be returned.
+    </simpara>
+
+    <example>
+     <title>Stating a file via SFTP</title>
+     <programlisting role="php">
+<![CDATA[
+<?php
+$connection = ssh2_connect('shell.example.com', 22);
+ssh2_auth_password($connection, 'username', 'password');
+
+$sftp = ssh2_sftp($connection);
+$statinfo = ssh2_stat($sftp, '/path/to/symlink');
+
+$filesize = $statinfo['size'];
+$group = $statinfo['gid'];
+$owner = $statinfo['uid'];
+$atime = $statinfo['atime'];
+$mtime = $statinfo['mtime'];
+$mode = $statinfo['mode'];
+?>
+]]>
+     </programlisting>
+    </example>
+
+    <simpara>
+     See Also:
+     <function>ssh2_sftp_lstat</function>,
+     <function>lstat</function>, and
+     <function>stat</function>
+    </simpara>
 
    </refsect1>
   </refentry>
http://cvs.php.net/diff.php/phpdoc/en/reference/ssh2/functions/ssh2-sftp-lstat.xml?r1=1.1&r2=1.2&ty=u
Index: phpdoc/en/reference/ssh2/functions/ssh2-sftp-lstat.xml
diff -u phpdoc/en/reference/ssh2/functions/ssh2-sftp-lstat.xml:1.1 
phpdoc/en/reference/ssh2/functions/ssh2-sftp-lstat.xml:1.2
--- phpdoc/en/reference/ssh2/functions/ssh2-sftp-lstat.xml:1.1  Fri Dec 24 
20:03:17 2004
+++ phpdoc/en/reference/ssh2/functions/ssh2-sftp-lstat.xml      Thu Dec 30 
00:35:30 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-lstat">
    <refnamediv>
@@ -16,10 +16,43 @@
      <methodparam><type>string</type><parameter>path</parameter></methodparam>
     </methodsynopsis>
 
-    <para>
+    <simpara>
      Stats a symbolic link on the remote filesystem 
<emphasis>without</emphasis>
-     following the link.
-    </para>
+     following the link.  This function is similar to using the
+     <function>lstat</function> function with the
+     <link linkend="wrappers.ssh2">ssh2.sftp://</link> wrapper in PHP5
+     and returns the same values.  See the documentation for
+     <function>stat</function> for details on the values which may be returned.
+    </simpara>
+
+    <example>
+     <title>Stating a symbolic link via SFTP</title>
+     <programlisting role="php">
+<![CDATA[
+<?php
+$connection = ssh2_connect('shell.example.com', 22);
+ssh2_auth_password($connection, 'username', 'password');
+
+$sftp = ssh2_sftp($connection);
+$statinfo = ssh2_lstat($sftp, '/path/to/symlink');
+
+$filesize = $statinfo['size'];
+$group = $statinfo['gid'];
+$owner = $statinfo['uid'];
+$atime = $statinfo['atime'];
+$mtime = $statinfo['mtime'];
+$mode = $statinfo['mode'];
+?>
+]]>
+     </programlisting>
+    </example>
+
+    <simpara>
+     See Also:
+     <function>ssh2_sftp_stat</function>,
+     <function>lstat</function>, and
+     <function>stat</function>
+    </simpara>
 
    </refsect1>
   </refentry>

Reply via email to