diff options
author | Jeremy T. Bouse <jbouse@debian.org> | 2009-11-27 16:20:12 -0500 |
---|---|---|
committer | Jeremy T. Bouse <jbouse@debian.org> | 2009-11-27 16:20:12 -0500 |
commit | ed280d5ac360e2af796e9bd973d7b4df89f0c449 (patch) | |
tree | ce892d6ce9dad8c0ecbc9cbe73f8095195bef0b4 /docs/paramiko.sftp_server-pysrc.html | |
parent | 176c6caf4ea7918e1698438634b237fab8456471 (diff) | |
download | python-paramiko-ed280d5ac360e2af796e9bd973d7b4df89f0c449.tar python-paramiko-ed280d5ac360e2af796e9bd973d7b4df89f0c449.tar.gz |
Imported Upstream version 1.7.4upstream/1.7.4
Diffstat (limited to 'docs/paramiko.sftp_server-pysrc.html')
-rw-r--r-- | docs/paramiko.sftp_server-pysrc.html | 1196 |
1 files changed, 1196 insertions, 0 deletions
diff --git a/docs/paramiko.sftp_server-pysrc.html b/docs/paramiko.sftp_server-pysrc.html new file mode 100644 index 0000000..cd77999 --- /dev/null +++ b/docs/paramiko.sftp_server-pysrc.html @@ -0,0 +1,1196 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>paramiko.sftp_server</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="paramiko-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table width="100%" cellpadding="0" cellspacing="0"> + <tr valign="top"> + <td width="100%"> + <span class="breadcrumbs"> + <a href="paramiko-module.html">Package paramiko</a> :: + Module sftp_server + </span> + </td> + <td> + <table cellpadding="0" cellspacing="0"> + <!-- hide/show private --> + <tr><td align="right"><span class="options" + >[<a href="frames.html" target="_top">frames</a + >] | <a href="paramiko.sftp_server-pysrc.html" + target="_top">no frames</a>]</span></td></tr> + </table> + </td> + </tr> +</table> +<h1 class="epydoc">Source Code for <a href="paramiko.sftp_server-module.html" onclick="show_private();">Module paramiko.sftp_server</a></h1> +<pre class="py-src"> +<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment"># Copyright (C) 2003-2007 Robey Pointer <robey@lag.net></tt> </tt> +<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> +<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This file is part of paramiko.</tt> </tt> +<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> +<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Paramiko is free software; you can redistribute it and/or modify it under the</tt> </tt> +<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># terms of the GNU Lesser General Public License as published by the Free</tt> </tt> +<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Software Foundation; either version 2.1 of the License, or (at your option)</tt> </tt> +<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># any later version.</tt> </tt> +<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> +<a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY</tt> </tt> +<a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR</tt> </tt> +<a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more</tt> </tt> +<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># details.</tt> </tt> +<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#</tt> </tt> +<a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># You should have received a copy of the GNU Lesser General Public License</tt> </tt> +<a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># along with Paramiko; if not, write to the Free Software Foundation, Inc.,</tt> </tt> +<a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.</tt> </tt> +<a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt> +<a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt> +<a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"><tt class="py-docstring">Server-mode SFTP support.</tt> </tt> +<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt> +<a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"> </tt> +<a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt> +<a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">errno</tt> </tt> +<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"> </tt> +<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">Crypto</tt><tt class="py-op">.</tt><tt class="py-name">Hash</tt> <tt class="py-keyword">import</tt> <tt class="py-name">MD5</tt><tt class="py-op">,</tt> <tt class="py-name">SHA</tt> </tt> +<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package paramiko=paramiko-module.html"><a title="paramiko" class="py-name" href="#" onclick="return doclink('link-0', 'paramiko', 'link-0');">paramiko</a></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Module paramiko.common=paramiko.common-module.html"><a title="paramiko.common" class="py-name" href="#" onclick="return doclink('link-1', 'common', 'link-1');">common</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt> +<a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name"><a title="paramiko" class="py-name" href="#" onclick="return doclink('link-2', 'paramiko', 'link-0');">paramiko</a></tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Module paramiko.server=paramiko.server-module.html"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-3', 'server', 'link-3');">server</a></tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Class paramiko.SubsystemHandler=paramiko.SubsystemHandler-class.html"><a title="paramiko.SubsystemHandler" class="py-name" href="#" onclick="return doclink('link-4', 'SubsystemHandler', 'link-4');">SubsystemHandler</a></tt> </tt> +<a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-5" class="py-name"><a title="paramiko" class="py-name" href="#" onclick="return doclink('link-5', 'paramiko', 'link-0');">paramiko</a></tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Module paramiko.sftp=paramiko.sftp-module.html"><a title="paramiko.sftp" class="py-name" href="#" onclick="return doclink('link-6', 'sftp', 'link-6');">sftp</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt> +<a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-7" class="py-name"><a title="paramiko" class="py-name" href="#" onclick="return doclink('link-7', 'paramiko', 'link-0');">paramiko</a></tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Module paramiko.sftp_si=paramiko.sftp_si-module.html"><a title="paramiko.sftp_si" class="py-name" href="#" onclick="return doclink('link-8', 'sftp_si', 'link-8');">sftp_si</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt> +<a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-9" class="py-name"><a title="paramiko" class="py-name" href="#" onclick="return doclink('link-9', 'paramiko', 'link-0');">paramiko</a></tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Module paramiko.sftp_attr=paramiko.sftp_attr-module.html"><a title="paramiko.sftp_attr" class="py-name" href="#" onclick="return doclink('link-10', 'sftp_attr', 'link-10');">sftp_attr</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt> +<a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line"> </tt> +<a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"> </tt> +<a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"><tt class="py-comment"># known hash algorithms for the "check-file" extension</tt> </tt> +<a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"><tt class="py-comment"></tt><tt id="link-11" class="py-name" targets="Variable paramiko.sftp_server._hash_class=paramiko.sftp_server-module.html#_hash_class"><a title="paramiko.sftp_server._hash_class" class="py-name" href="#" onclick="return doclink('link-11', '_hash_class', 'link-11');">_hash_class</a></tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> </tt> +<a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"> <tt class="py-string">'sha1'</tt><tt class="py-op">:</tt> <tt class="py-name">SHA</tt><tt class="py-op">,</tt> </tt> +<a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"> <tt class="py-string">'md5'</tt><tt class="py-op">:</tt> <tt class="py-name">MD5</tt><tt class="py-op">,</tt> </tt> +<a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"><tt class="py-op">}</tt> </tt> +<a name="L39"></a><tt class="py-lineno"> 39</tt> <tt class="py-line"> </tt> +<a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"> </tt> +<a name="SFTPServer"></a><div id="SFTPServer-def"><a name="L41"></a><tt class="py-lineno"> 41</tt> <a class="py-toggle" href="#" id="SFTPServer-toggle" onclick="return toggle('SFTPServer');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html">SFTPServer</a> <tt class="py-op">(</tt><tt class="py-base-class">BaseSFTP</tt><tt class="py-op">,</tt> <tt class="py-base-class">SubsystemHandler</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="SFTPServer-expanded"><a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt> +<a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"><tt class="py-docstring"> Server-side SFTP subsystem support. Since this is a L{SubsystemHandler},</tt> </tt> +<a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"><tt class="py-docstring"> it can be (and is meant to be) set as the handler for C{"sftp"} requests.</tt> </tt> +<a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"><tt class="py-docstring"> Use L{Transport.set_subsystem_handler} to activate this class.</tt> </tt> +<a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"> </tt> +<a name="SFTPServer.__init__"></a><div id="SFTPServer.__init__-def"><a name="L48"></a><tt class="py-lineno"> 48</tt> <a class="py-toggle" href="#" id="SFTPServer.__init__-toggle" onclick="return toggle('SFTPServer.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">channel</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">server</tt><tt class="py-op">,</tt> <tt class="py-param">sftp_si</tt><tt class="py-op">=</tt><tt id="link-12" class="py-name" targets="Class paramiko.SFTPServerInterface=paramiko.SFTPServerInterface-class.html"><a title="paramiko.SFTPServerInterface" class="py-name" href="#" onclick="return doclink('link-12', 'SFTPServerInterface', 'link-12');">SFTPServerInterface</a></tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">largs</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer.__init__-expanded"><a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt> +<a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"><tt class="py-docstring"> The constructor for SFTPServer is meant to be called from within the</tt> </tt> +<a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"><tt class="py-docstring"> L{Transport} as a subsystem handler. C{server} and any additional</tt> </tt> +<a name="L52"></a><tt class="py-lineno"> 52</tt> <tt class="py-line"><tt class="py-docstring"> parameters or keyword parameters are passed from the original call to</tt> </tt> +<a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"><tt class="py-docstring"> L{Transport.set_subsystem_handler}.</tt> </tt> +<a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt> +<a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"><tt class="py-docstring"> @param channel: channel passed from the L{Transport}.</tt> </tt> +<a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"><tt class="py-docstring"> @type channel: L{Channel}</tt> </tt> +<a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"><tt class="py-docstring"> @param name: name of the requested subsystem.</tt> </tt> +<a name="L58"></a><tt class="py-lineno"> 58</tt> <tt class="py-line"><tt class="py-docstring"> @type name: str</tt> </tt> +<a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"><tt class="py-docstring"> @param server: the server object associated with this channel and</tt> </tt> +<a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"><tt class="py-docstring"> subsystem</tt> </tt> +<a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"><tt class="py-docstring"> @type server: L{ServerInterface}</tt> </tt> +<a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"><tt class="py-docstring"> @param sftp_si: a subclass of L{SFTPServerInterface} to use for handling</tt> </tt> +<a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"><tt class="py-docstring"> individual requests.</tt> </tt> +<a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"><tt class="py-docstring"> @type sftp_si: class</tt> </tt> +<a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"> <tt class="py-name">BaseSFTP</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method paramiko.Agent.__init__()=paramiko.Agent-class.html#__init__,Method paramiko.AgentKey.__init__()=paramiko.AgentKey-class.html#__init__,Method paramiko.BadAuthenticationType.__init__()=paramiko.BadAuthenticationType-class.html#__init__,Method paramiko.BadHostKeyException.__init__()=paramiko.BadHostKeyException-class.html#__init__,Method paramiko.BufferedFile.__init__()=paramiko.BufferedFile-class.html#__init__,Method paramiko.Channel.__init__()=paramiko.Channel-class.html#__init__,Method paramiko.ChannelException.__init__()=paramiko.ChannelException-class.html#__init__,Method paramiko.DSSKey.__init__()=paramiko.DSSKey-class.html#__init__,Method paramiko.HostKeys.__init__()=paramiko.HostKeys-class.html#__init__,Method paramiko.Message.__init__()=paramiko.Message-class.html#__init__,Method paramiko.PKey.__init__()=paramiko.PKey-class.html#__init__,Method paramiko.RSAKey.__init__()=paramiko.RSAKey-class.html#__init__,Method paramiko.SFTPAttributes.__init__()=paramiko.SFTPAttributes-class.html#__init__,Method paramiko.SFTPClient.__init__()=paramiko.SFTPClient-class.html#__init__,Method paramiko.SFTPFile.__init__()=paramiko.SFTPFile-class.html#__init__,Method paramiko.SFTPHandle.__init__()=paramiko.SFTPHandle-class.html#__init__,Method paramiko.SFTPServer.__init__()=paramiko.SFTPServer-class.html#__init__,Method paramiko.SFTPServerInterface.__init__()=paramiko.SFTPServerInterface-class.html#__init__,Method paramiko.SSHClient.__init__()=paramiko.SSHClient-class.html#__init__,Method paramiko.SSHConfig.__init__()=paramiko.SSHConfig-class.html#__init__,Method paramiko.SecurityOptions.__init__()=paramiko.SecurityOptions-class.html#__init__,Method paramiko.SubsystemHandler.__init__()=paramiko.SubsystemHandler-class.html#__init__,Method paramiko.Transport.__init__()=paramiko.Transport-class.html#__init__,Method paramiko.ber.BER.__init__()=paramiko.ber.BER-class.html#__init__,Method paramiko.buffered_pipe.BufferedPipe.__init__()=paramiko.buffered_pipe.BufferedPipe-class.html#__init__,Method paramiko.channel.ChannelStderrFile.__init__()=paramiko.channel.ChannelStderrFile-class.html#__init__,Method paramiko.compress.ZlibCompressor.__init__()=paramiko.compress.ZlibCompressor-class.html#__init__,Method paramiko.compress.ZlibDecompressor.__init__()=paramiko.compress.ZlibDecompressor-class.html#__init__,Method paramiko.hostkeys.HostKeyEntry.__init__()=paramiko.hostkeys.HostKeyEntry-class.html#__init__,Method paramiko.kex_gex.KexGex.__init__()=paramiko.kex_gex.KexGex-class.html#__init__,Method paramiko.kex_group1.KexGroup1.__init__()=paramiko.kex_group1.KexGroup1-class.html#__init__,Method paramiko.logging22.Formatter.__init__()=paramiko.logging22.Formatter-class.html#__init__,Method paramiko.logging22.StreamHandler.__init__()=paramiko.logging22.StreamHandler-class.html#__init__,Method paramiko.logging22.logger.__init__()=paramiko.logging22.logger-class.html#__init__,Method paramiko.pipe.OrPipe.__init__()=paramiko.pipe.OrPipe-class.html#__init__,Method paramiko.pipe.PosixPipe.__init__()=paramiko.pipe.PosixPipe-class.html#__init__,Method paramiko.pipe.WindowsPipe.__init__()=paramiko.pipe.WindowsPipe-class.html#__init__,Method paramiko.primes.ModulusPack.__init__()=paramiko.primes.ModulusPack-class.html#__init__,Method paramiko.rng.StrongLockingRandomPool.__init__()=paramiko.rng.StrongLockingRandomPool-class.html#__init__,Method paramiko.ssh_exception.PartialAuthentication.__init__()=paramiko.ssh_exception.PartialAuthentication-class.html#__init__,Method paramiko.transport.ChannelMap.__init__()=paramiko.transport.ChannelMap-class.html#__init__,Method paramiko.util.enumerate.__init__()=paramiko.util.enumerate-class.html#__init__,Method paramiko.win_pageant.PageantConnection.__init__()=paramiko.win_pageant.PageantConnection-class.html#__init__"><a title="paramiko.Agent.__init__ +paramiko.AgentKey.__init__ +paramiko.BadAuthenticationType.__init__ +paramiko.BadHostKeyException.__init__ +paramiko.BufferedFile.__init__ +paramiko.Channel.__init__ +paramiko.ChannelException.__init__ +paramiko.DSSKey.__init__ +paramiko.HostKeys.__init__ +paramiko.Message.__init__ +paramiko.PKey.__init__ +paramiko.RSAKey.__init__ +paramiko.SFTPAttributes.__init__ +paramiko.SFTPClient.__init__ +paramiko.SFTPFile.__init__ +paramiko.SFTPHandle.__init__ +paramiko.SFTPServer.__init__ +paramiko.SFTPServerInterface.__init__ +paramiko.SSHClient.__init__ +paramiko.SSHConfig.__init__ +paramiko.SecurityOptions.__init__ +paramiko.SubsystemHandler.__init__ +paramiko.Transport.__init__ +paramiko.ber.BER.__init__ +paramiko.buffered_pipe.BufferedPipe.__init__ +paramiko.channel.ChannelStderrFile.__init__ +paramiko.compress.ZlibCompressor.__init__ +paramiko.compress.ZlibDecompressor.__init__ +paramiko.hostkeys.HostKeyEntry.__init__ +paramiko.kex_gex.KexGex.__init__ +paramiko.kex_group1.KexGroup1.__init__ +paramiko.logging22.Formatter.__init__ +paramiko.logging22.StreamHandler.__init__ +paramiko.logging22.logger.__init__ +paramiko.pipe.OrPipe.__init__ +paramiko.pipe.PosixPipe.__init__ +paramiko.pipe.WindowsPipe.__init__ +paramiko.primes.ModulusPack.__init__ +paramiko.rng.StrongLockingRandomPool.__init__ +paramiko.ssh_exception.PartialAuthentication.__init__ +paramiko.transport.ChannelMap.__init__ +paramiko.util.enumerate.__init__ +paramiko.win_pageant.PageantConnection.__init__" class="py-name" href="#" onclick="return doclink('link-13', '__init__', 'link-13');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt> +<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"> <tt id="link-14" class="py-name"><a title="paramiko.SubsystemHandler" class="py-name" href="#" onclick="return doclink('link-14', 'SubsystemHandler', 'link-4');">SubsystemHandler</a></tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="paramiko.Agent.__init__ +paramiko.AgentKey.__init__ +paramiko.BadAuthenticationType.__init__ +paramiko.BadHostKeyException.__init__ +paramiko.BufferedFile.__init__ +paramiko.Channel.__init__ +paramiko.ChannelException.__init__ +paramiko.DSSKey.__init__ +paramiko.HostKeys.__init__ +paramiko.Message.__init__ +paramiko.PKey.__init__ +paramiko.RSAKey.__init__ +paramiko.SFTPAttributes.__init__ +paramiko.SFTPClient.__init__ +paramiko.SFTPFile.__init__ +paramiko.SFTPHandle.__init__ +paramiko.SFTPServer.__init__ +paramiko.SFTPServerInterface.__init__ +paramiko.SSHClient.__init__ +paramiko.SSHConfig.__init__ +paramiko.SecurityOptions.__init__ +paramiko.SubsystemHandler.__init__ +paramiko.Transport.__init__ +paramiko.ber.BER.__init__ +paramiko.buffered_pipe.BufferedPipe.__init__ +paramiko.channel.ChannelStderrFile.__init__ +paramiko.compress.ZlibCompressor.__init__ +paramiko.compress.ZlibDecompressor.__init__ +paramiko.hostkeys.HostKeyEntry.__init__ +paramiko.kex_gex.KexGex.__init__ +paramiko.kex_group1.KexGroup1.__init__ +paramiko.logging22.Formatter.__init__ +paramiko.logging22.StreamHandler.__init__ +paramiko.logging22.logger.__init__ +paramiko.pipe.OrPipe.__init__ +paramiko.pipe.PosixPipe.__init__ +paramiko.pipe.WindowsPipe.__init__ +paramiko.primes.ModulusPack.__init__ +paramiko.rng.StrongLockingRandomPool.__init__ +paramiko.ssh_exception.PartialAuthentication.__init__ +paramiko.transport.ChannelMap.__init__ +paramiko.util.enumerate.__init__ +paramiko.win_pageant.PageantConnection.__init__" class="py-name" href="#" onclick="return doclink('link-15', '__init__', 'link-13');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt id="link-16" class="py-name" targets="Module paramiko.channel=paramiko.channel-module.html"><a title="paramiko.channel" class="py-name" href="#" onclick="return doclink('link-16', 'channel', 'link-16');">channel</a></tt><tt class="py-op">,</tt> <tt id="link-17" class="py-name" targets="Variable paramiko.kex_gex.KexGex.name=paramiko.kex_gex.KexGex-class.html#name,Variable paramiko.kex_group1.KexGroup1.name=paramiko.kex_group1.KexGroup1-class.html#name"><a title="paramiko.kex_gex.KexGex.name +paramiko.kex_group1.KexGroup1.name" class="py-name" href="#" onclick="return doclink('link-17', 'name', 'link-17');">name</a></tt><tt class="py-op">,</tt> <tt id="link-18" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-18', 'server', 'link-3');">server</a></tt><tt class="py-op">)</tt> </tt> +<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"> <tt id="link-19" class="py-name" targets="Module paramiko.transport=paramiko.transport-module.html"><a title="paramiko.transport" class="py-name" href="#" onclick="return doclink('link-19', 'transport', 'link-19');">transport</a></tt> <tt class="py-op">=</tt> <tt id="link-20" class="py-name"><a title="paramiko.channel" class="py-name" href="#" onclick="return doclink('link-20', 'channel', 'link-16');">channel</a></tt><tt class="py-op">.</tt><tt id="link-21" class="py-name" targets="Method paramiko.Channel.get_transport()=paramiko.Channel-class.html#get_transport,Method paramiko.SSHClient.get_transport()=paramiko.SSHClient-class.html#get_transport"><a title="paramiko.Channel.get_transport +paramiko.SSHClient.get_transport" class="py-name" href="#" onclick="return doclink('link-21', 'get_transport', 'link-21');">get_transport</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Class paramiko.logging22.logger=paramiko.logging22.logger-class.html"><a title="paramiko.logging22.logger" class="py-name" href="#" onclick="return doclink('link-22', 'logger', 'link-22');">logger</a></tt> <tt class="py-op">=</tt> <tt id="link-23" class="py-name" targets="Module paramiko.util=paramiko.util-module.html"><a title="paramiko.util" class="py-name" href="#" onclick="return doclink('link-23', 'util', 'link-23');">util</a></tt><tt class="py-op">.</tt><tt id="link-24" class="py-name" targets="Function paramiko.util.get_logger()=paramiko.util-module.html#get_logger"><a title="paramiko.util.get_logger" class="py-name" href="#" onclick="return doclink('link-24', 'get_logger', 'link-24');">get_logger</a></tt><tt class="py-op">(</tt><tt id="link-25" class="py-name"><a title="paramiko.transport" class="py-name" href="#" onclick="return doclink('link-25', 'transport', 'link-19');">transport</a></tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Method paramiko.Transport.get_log_channel()=paramiko.Transport-class.html#get_log_channel"><a title="paramiko.Transport.get_log_channel" class="py-name" href="#" onclick="return doclink('link-26', 'get_log_channel', 'link-26');">get_log_channel</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'.sftp'</tt><tt class="py-op">)</tt> </tt> +<a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">ultra_debug</tt> <tt class="py-op">=</tt> <tt id="link-27" class="py-name"><a title="paramiko.transport" class="py-name" href="#" onclick="return doclink('link-27', 'transport', 'link-19');">transport</a></tt><tt class="py-op">.</tt><tt id="link-28" class="py-name" targets="Method paramiko.Transport.get_hexdump()=paramiko.Transport-class.html#get_hexdump"><a title="paramiko.Transport.get_hexdump" class="py-name" href="#" onclick="return doclink('link-28', 'get_hexdump', 'link-28');">get_hexdump</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">next_handle</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt> +<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"> <tt class="py-comment"># map of handle-string to SFTPHandle for files & folders:</tt> </tt> +<a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> <tt class="py-op">}</tt> </tt> +<a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">folder_table</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt> <tt class="py-op">}</tt> </tt> +<a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-29', 'server', 'link-3');">server</a></tt> <tt class="py-op">=</tt> <tt id="link-30" class="py-name"><a title="paramiko.sftp_si" class="py-name" href="#" onclick="return doclink('link-30', 'sftp_si', 'link-8');">sftp_si</a></tt><tt class="py-op">(</tt><tt id="link-31" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-31', 'server', 'link-3');">server</a></tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">largs</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt> +</div><a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"> </tt> +<a name="SFTPServer._log"></a><div id="SFTPServer._log-def"><a name="L77"></a><tt class="py-lineno"> 77</tt> <a class="py-toggle" href="#" id="SFTPServer._log-toggle" onclick="return toggle('SFTPServer._log');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#_log">_log</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">level</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer._log-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer._log-expanded"><a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">issubclass</tt><tt class="py-op">(</tt><tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">m</tt> <tt class="py-keyword">in</tt> <tt class="py-name">msg</tt><tt class="py-op">:</tt> </tt> +<a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"> <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-32" class="py-name" targets="Class paramiko.SFTPServer=paramiko.SFTPServer-class.html"><a title="paramiko.SFTPServer" class="py-name" href="#" onclick="return doclink('link-32', 'SFTPServer', 'link-32');">SFTPServer</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">_log</tt><tt class="py-op">(</tt><tt class="py-name">level</tt><tt class="py-op">,</tt> <tt class="py-string">"[chan "</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sock</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name" targets="Method paramiko.AgentKey.get_name()=paramiko.AgentKey-class.html#get_name,Method paramiko.Channel.get_name()=paramiko.Channel-class.html#get_name,Method paramiko.DSSKey.get_name()=paramiko.DSSKey-class.html#get_name,Method paramiko.PKey.get_name()=paramiko.PKey-class.html#get_name,Method paramiko.RSAKey.get_name()=paramiko.RSAKey-class.html#get_name"><a title="paramiko.AgentKey.get_name +paramiko.Channel.get_name +paramiko.DSSKey.get_name +paramiko.PKey.get_name +paramiko.RSAKey.get_name" class="py-name" href="#" onclick="return doclink('link-33', 'get_name', 'link-33');">get_name</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">"] "</tt> <tt class="py-op">+</tt> <tt class="py-name">m</tt><tt class="py-op">)</tt> </tt> +<a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"> <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-34" class="py-name"><a title="paramiko.SFTPServer" class="py-name" href="#" onclick="return doclink('link-34', 'SFTPServer', 'link-32');">SFTPServer</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">_log</tt><tt class="py-op">(</tt><tt class="py-name">level</tt><tt class="py-op">,</tt> <tt class="py-string">"[chan "</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sock</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="paramiko.AgentKey.get_name +paramiko.Channel.get_name +paramiko.DSSKey.get_name +paramiko.PKey.get_name +paramiko.RSAKey.get_name" class="py-name" href="#" onclick="return doclink('link-35', 'get_name', 'link-33');">get_name</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">"] "</tt> <tt class="py-op">+</tt> <tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt> +</div><a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"> </tt> +<a name="SFTPServer.start_subsystem"></a><div id="SFTPServer.start_subsystem-def"><a name="L84"></a><tt class="py-lineno"> 84</tt> <a class="py-toggle" href="#" id="SFTPServer.start_subsystem-toggle" onclick="return toggle('SFTPServer.start_subsystem');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#start_subsystem">start_subsystem</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">transport</tt><tt class="py-op">,</tt> <tt class="py-param">channel</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer.start_subsystem-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer.start_subsystem-expanded"><a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">sock</tt> <tt class="py-op">=</tt> <tt id="link-36" class="py-name"><a title="paramiko.channel" class="py-name" href="#" onclick="return doclink('link-36', 'channel', 'link-16');">channel</a></tt> </tt> +<a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_log</tt><tt class="py-op">(</tt><tt id="link-37" class="py-name" targets="Variable paramiko.auth_handler.DEBUG=paramiko.auth_handler-module.html#DEBUG,Variable paramiko.channel.DEBUG=paramiko.channel-module.html#DEBUG,Variable paramiko.client.DEBUG=paramiko.client-module.html#DEBUG,Variable paramiko.common.DEBUG=paramiko.common-module.html#DEBUG,Variable paramiko.dsskey.DEBUG=paramiko.dsskey-module.html#DEBUG,Variable paramiko.hostkeys.DEBUG=paramiko.hostkeys-module.html#DEBUG,Variable paramiko.kex_gex.DEBUG=paramiko.kex_gex-module.html#DEBUG,Variable paramiko.kex_group1.DEBUG=paramiko.kex_group1-module.html#DEBUG,Variable paramiko.logging22.DEBUG=paramiko.logging22-module.html#DEBUG,Variable paramiko.packet.DEBUG=paramiko.packet-module.html#DEBUG,Variable paramiko.pkey.DEBUG=paramiko.pkey-module.html#DEBUG,Variable paramiko.rsakey.DEBUG=paramiko.rsakey-module.html#DEBUG,Variable paramiko.server.DEBUG=paramiko.server-module.html#DEBUG,Variable paramiko.sftp.DEBUG=paramiko.sftp-module.html#DEBUG,Variable paramiko.sftp_attr.DEBUG=paramiko.sftp_attr-module.html#DEBUG,Variable paramiko.sftp_client.DEBUG=paramiko.sftp_client-module.html#DEBUG,Variable paramiko.sftp_file.DEBUG=paramiko.sftp_file-module.html#DEBUG,Variable paramiko.sftp_handle.DEBUG=paramiko.sftp_handle-module.html#DEBUG,Variable paramiko.sftp_server.DEBUG=paramiko.sftp_server-module.html#DEBUG,Variable paramiko.sftp_si.DEBUG=paramiko.sftp_si-module.html#DEBUG,Variable paramiko.transport.DEBUG=paramiko.transport-module.html#DEBUG,Variable paramiko.util.DEBUG=paramiko.util-module.html#DEBUG"><a title="paramiko.auth_handler.DEBUG +paramiko.channel.DEBUG +paramiko.client.DEBUG +paramiko.common.DEBUG +paramiko.dsskey.DEBUG +paramiko.hostkeys.DEBUG +paramiko.kex_gex.DEBUG +paramiko.kex_group1.DEBUG +paramiko.logging22.DEBUG +paramiko.packet.DEBUG +paramiko.pkey.DEBUG +paramiko.rsakey.DEBUG +paramiko.server.DEBUG +paramiko.sftp.DEBUG +paramiko.sftp_attr.DEBUG +paramiko.sftp_client.DEBUG +paramiko.sftp_file.DEBUG +paramiko.sftp_handle.DEBUG +paramiko.sftp_server.DEBUG +paramiko.sftp_si.DEBUG +paramiko.transport.DEBUG +paramiko.util.DEBUG" class="py-name" href="#" onclick="return doclink('link-37', 'DEBUG', 'link-37');">DEBUG</a></tt><tt class="py-op">,</tt> <tt class="py-string">'Started sftp server on channel %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt id="link-38" class="py-name"><a title="paramiko.channel" class="py-name" href="#" onclick="return doclink('link-38', 'channel', 'link-16');">channel</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_server_version</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-39', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-40" class="py-name" targets="Method paramiko.SFTPServerInterface.session_started()=paramiko.SFTPServerInterface-class.html#session_started"><a title="paramiko.SFTPServerInterface.session_started" class="py-name" href="#" onclick="return doclink('link-40', 'session_started', 'link-40');">session_started</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-name">True</tt><tt class="py-op">:</tt> </tt> +<a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt> +<a name="L91"></a><tt class="py-lineno"> 91</tt> <tt class="py-line"> <tt class="py-name">t</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_packet</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">EOFError</tt><tt class="py-op">:</tt> </tt> +<a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_log</tt><tt class="py-op">(</tt><tt id="link-41" class="py-name"><a title="paramiko.auth_handler.DEBUG +paramiko.channel.DEBUG +paramiko.client.DEBUG +paramiko.common.DEBUG +paramiko.dsskey.DEBUG +paramiko.hostkeys.DEBUG +paramiko.kex_gex.DEBUG +paramiko.kex_group1.DEBUG +paramiko.logging22.DEBUG +paramiko.packet.DEBUG +paramiko.pkey.DEBUG +paramiko.rsakey.DEBUG +paramiko.server.DEBUG +paramiko.sftp.DEBUG +paramiko.sftp_attr.DEBUG +paramiko.sftp_client.DEBUG +paramiko.sftp_file.DEBUG +paramiko.sftp_handle.DEBUG +paramiko.sftp_server.DEBUG +paramiko.sftp_si.DEBUG +paramiko.transport.DEBUG +paramiko.util.DEBUG" class="py-name" href="#" onclick="return doclink('link-41', 'DEBUG', 'link-37');">DEBUG</a></tt><tt class="py-op">,</tt> <tt class="py-string">'EOF -- end of session'</tt><tt class="py-op">)</tt> </tt> +<a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">Exception</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt> +<a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_log</tt><tt class="py-op">(</tt><tt id="link-42" class="py-name"><a title="paramiko.auth_handler.DEBUG +paramiko.channel.DEBUG +paramiko.client.DEBUG +paramiko.common.DEBUG +paramiko.dsskey.DEBUG +paramiko.hostkeys.DEBUG +paramiko.kex_gex.DEBUG +paramiko.kex_group1.DEBUG +paramiko.logging22.DEBUG +paramiko.packet.DEBUG +paramiko.pkey.DEBUG +paramiko.rsakey.DEBUG +paramiko.server.DEBUG +paramiko.sftp.DEBUG +paramiko.sftp_attr.DEBUG +paramiko.sftp_client.DEBUG +paramiko.sftp_file.DEBUG +paramiko.sftp_handle.DEBUG +paramiko.sftp_server.DEBUG +paramiko.sftp_si.DEBUG +paramiko.transport.DEBUG +paramiko.util.DEBUG" class="py-name" href="#" onclick="return doclink('link-42', 'DEBUG', 'link-37');">DEBUG</a></tt><tt class="py-op">,</tt> <tt class="py-string">'Exception on channel: '</tt> <tt class="py-op">+</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_log</tt><tt class="py-op">(</tt><tt id="link-43" class="py-name"><a title="paramiko.auth_handler.DEBUG +paramiko.channel.DEBUG +paramiko.client.DEBUG +paramiko.common.DEBUG +paramiko.dsskey.DEBUG +paramiko.hostkeys.DEBUG +paramiko.kex_gex.DEBUG +paramiko.kex_group1.DEBUG +paramiko.logging22.DEBUG +paramiko.packet.DEBUG +paramiko.pkey.DEBUG +paramiko.rsakey.DEBUG +paramiko.server.DEBUG +paramiko.sftp.DEBUG +paramiko.sftp_attr.DEBUG +paramiko.sftp_client.DEBUG +paramiko.sftp_file.DEBUG +paramiko.sftp_handle.DEBUG +paramiko.sftp_server.DEBUG +paramiko.sftp_si.DEBUG +paramiko.transport.DEBUG +paramiko.util.DEBUG" class="py-name" href="#" onclick="return doclink('link-43', 'DEBUG', 'link-37');">DEBUG</a></tt><tt class="py-op">,</tt> <tt id="link-44" class="py-name"><a title="paramiko.util" class="py-name" href="#" onclick="return doclink('link-44', 'util', 'link-23');">util</a></tt><tt class="py-op">.</tt><tt id="link-45" class="py-name" targets="Function paramiko.util.tb_strings()=paramiko.util-module.html#tb_strings"><a title="paramiko.util.tb_strings" class="py-name" href="#" onclick="return doclink('link-45', 'tb_strings', 'link-45');">tb_strings</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"> <tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt id="link-46" class="py-name" targets="Class paramiko.Message=paramiko.Message-class.html"><a title="paramiko.Message" class="py-name" href="#" onclick="return doclink('link-46', 'Message', 'link-46');">Message</a></tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt> +<a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"> <tt class="py-name">request_number</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name" targets="Method paramiko.Message.get_int()=paramiko.Message-class.html#get_int"><a title="paramiko.Message.get_int" class="py-name" href="#" onclick="return doclink('link-47', 'get_int', 'link-47');">get_int</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L101"></a><tt class="py-lineno">101</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt> +<a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_process</tt><tt class="py-op">(</tt><tt class="py-name">t</tt><tt class="py-op">,</tt> <tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt> +<a name="L103"></a><tt class="py-lineno">103</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">Exception</tt><tt class="py-op">,</tt> <tt class="py-name">e</tt><tt class="py-op">:</tt> </tt> +<a name="L104"></a><tt class="py-lineno">104</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_log</tt><tt class="py-op">(</tt><tt id="link-48" class="py-name"><a title="paramiko.auth_handler.DEBUG +paramiko.channel.DEBUG +paramiko.client.DEBUG +paramiko.common.DEBUG +paramiko.dsskey.DEBUG +paramiko.hostkeys.DEBUG +paramiko.kex_gex.DEBUG +paramiko.kex_group1.DEBUG +paramiko.logging22.DEBUG +paramiko.packet.DEBUG +paramiko.pkey.DEBUG +paramiko.rsakey.DEBUG +paramiko.server.DEBUG +paramiko.sftp.DEBUG +paramiko.sftp_attr.DEBUG +paramiko.sftp_client.DEBUG +paramiko.sftp_file.DEBUG +paramiko.sftp_handle.DEBUG +paramiko.sftp_server.DEBUG +paramiko.sftp_si.DEBUG +paramiko.transport.DEBUG +paramiko.util.DEBUG" class="py-name" href="#" onclick="return doclink('link-48', 'DEBUG', 'link-37');">DEBUG</a></tt><tt class="py-op">,</tt> <tt class="py-string">'Exception in server processing: '</tt> <tt class="py-op">+</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">e</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L105"></a><tt class="py-lineno">105</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_log</tt><tt class="py-op">(</tt><tt id="link-49" class="py-name"><a title="paramiko.auth_handler.DEBUG +paramiko.channel.DEBUG +paramiko.client.DEBUG +paramiko.common.DEBUG +paramiko.dsskey.DEBUG +paramiko.hostkeys.DEBUG +paramiko.kex_gex.DEBUG +paramiko.kex_group1.DEBUG +paramiko.logging22.DEBUG +paramiko.packet.DEBUG +paramiko.pkey.DEBUG +paramiko.rsakey.DEBUG +paramiko.server.DEBUG +paramiko.sftp.DEBUG +paramiko.sftp_attr.DEBUG +paramiko.sftp_client.DEBUG +paramiko.sftp_file.DEBUG +paramiko.sftp_handle.DEBUG +paramiko.sftp_server.DEBUG +paramiko.sftp_si.DEBUG +paramiko.transport.DEBUG +paramiko.util.DEBUG" class="py-name" href="#" onclick="return doclink('link-49', 'DEBUG', 'link-37');">DEBUG</a></tt><tt class="py-op">,</tt> <tt id="link-50" class="py-name"><a title="paramiko.util" class="py-name" href="#" onclick="return doclink('link-50', 'util', 'link-23');">util</a></tt><tt class="py-op">.</tt><tt id="link-51" class="py-name"><a title="paramiko.util.tb_strings" class="py-name" href="#" onclick="return doclink('link-51', 'tb_strings', 'link-45');">tb_strings</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L106"></a><tt class="py-lineno">106</tt> <tt class="py-line"> <tt class="py-comment"># send some kind of failure message, at least</tt> </tt> +<a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt> +<a name="L108"></a><tt class="py-lineno">108</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-52" class="py-name" targets="Variable paramiko.sftp.SFTP_FAILURE=paramiko.sftp-module.html#SFTP_FAILURE,Variable paramiko.sftp_attr.SFTP_FAILURE=paramiko.sftp_attr-module.html#SFTP_FAILURE,Variable paramiko.sftp_client.SFTP_FAILURE=paramiko.sftp_client-module.html#SFTP_FAILURE,Variable paramiko.sftp_file.SFTP_FAILURE=paramiko.sftp_file-module.html#SFTP_FAILURE,Variable paramiko.sftp_handle.SFTP_FAILURE=paramiko.sftp_handle-module.html#SFTP_FAILURE,Variable paramiko.sftp_server.SFTP_FAILURE=paramiko.sftp_server-module.html#SFTP_FAILURE,Variable paramiko.sftp_si.SFTP_FAILURE=paramiko.sftp_si-module.html#SFTP_FAILURE"><a title="paramiko.sftp.SFTP_FAILURE +paramiko.sftp_attr.SFTP_FAILURE +paramiko.sftp_client.SFTP_FAILURE +paramiko.sftp_file.SFTP_FAILURE +paramiko.sftp_handle.SFTP_FAILURE +paramiko.sftp_server.SFTP_FAILURE +paramiko.sftp_si.SFTP_FAILURE" class="py-name" href="#" onclick="return doclink('link-52', 'SFTP_FAILURE', 'link-52');">SFTP_FAILURE</a></tt><tt class="py-op">)</tt> </tt> +<a name="L109"></a><tt class="py-lineno">109</tt> <tt class="py-line"> <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt> +<a name="L110"></a><tt class="py-lineno">110</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt> +</div><a name="L111"></a><tt class="py-lineno">111</tt> <tt class="py-line"> </tt> +<a name="SFTPServer.finish_subsystem"></a><div id="SFTPServer.finish_subsystem-def"><a name="L112"></a><tt class="py-lineno">112</tt> <a class="py-toggle" href="#" id="SFTPServer.finish_subsystem-toggle" onclick="return toggle('SFTPServer.finish_subsystem');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#finish_subsystem">finish_subsystem</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer.finish_subsystem-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer.finish_subsystem-expanded"><a name="L113"></a><tt class="py-lineno">113</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-53', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-54" class="py-name" targets="Method paramiko.SFTPServerInterface.session_ended()=paramiko.SFTPServerInterface-class.html#session_ended"><a title="paramiko.SFTPServerInterface.session_ended" class="py-name" href="#" onclick="return doclink('link-54', 'session_ended', 'link-54');">session_ended</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L114"></a><tt class="py-lineno">114</tt> <tt class="py-line"> <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-55" class="py-name"><a title="paramiko.SFTPServer" class="py-name" href="#" onclick="return doclink('link-55', 'SFTPServer', 'link-32');">SFTPServer</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name" targets="Method paramiko.SFTPServer.finish_subsystem()=paramiko.SFTPServer-class.html#finish_subsystem,Method paramiko.SubsystemHandler.finish_subsystem()=paramiko.SubsystemHandler-class.html#finish_subsystem"><a title="paramiko.SFTPServer.finish_subsystem +paramiko.SubsystemHandler.finish_subsystem" class="py-name" href="#" onclick="return doclink('link-56', 'finish_subsystem', 'link-56');">finish_subsystem</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L115"></a><tt class="py-lineno">115</tt> <tt class="py-line"> <tt class="py-comment"># close any file handles that were left open (so we can return them to the OS quickly)</tt> </tt> +<a name="L116"></a><tt class="py-lineno">116</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">.</tt><tt class="py-name">itervalues</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L117"></a><tt class="py-lineno">117</tt> <tt class="py-line"> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name" targets="Method paramiko.Agent.close()=paramiko.Agent-class.html#close,Method paramiko.BufferedFile.close()=paramiko.BufferedFile-class.html#close,Method paramiko.Channel.close()=paramiko.Channel-class.html#close,Method paramiko.SFTPClient.close()=paramiko.SFTPClient-class.html#close,Method paramiko.SFTPFile.close()=paramiko.SFTPFile-class.html#close,Method paramiko.SFTPHandle.close()=paramiko.SFTPHandle-class.html#close,Method paramiko.SSHClient.close()=paramiko.SSHClient-class.html#close,Method paramiko.Transport.close()=paramiko.Transport-class.html#close,Method paramiko.buffered_pipe.BufferedPipe.close()=paramiko.buffered_pipe.BufferedPipe-class.html#close,Method paramiko.pipe.PosixPipe.close()=paramiko.pipe.PosixPipe-class.html#close,Method paramiko.pipe.WindowsPipe.close()=paramiko.pipe.WindowsPipe-class.html#close,Method paramiko.win_pageant.PageantConnection.close()=paramiko.win_pageant.PageantConnection-class.html#close"><a title="paramiko.Agent.close +paramiko.BufferedFile.close +paramiko.Channel.close +paramiko.SFTPClient.close +paramiko.SFTPFile.close +paramiko.SFTPHandle.close +paramiko.SSHClient.close +paramiko.Transport.close +paramiko.buffered_pipe.BufferedPipe.close +paramiko.pipe.PosixPipe.close +paramiko.pipe.WindowsPipe.close +paramiko.win_pageant.PageantConnection.close" class="py-name" href="#" onclick="return doclink('link-57', 'close', 'link-57');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L118"></a><tt class="py-lineno">118</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">f</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">folder_table</tt><tt class="py-op">.</tt><tt class="py-name">itervalues</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L119"></a><tt class="py-lineno">119</tt> <tt class="py-line"> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="paramiko.Agent.close +paramiko.BufferedFile.close +paramiko.Channel.close +paramiko.SFTPClient.close +paramiko.SFTPFile.close +paramiko.SFTPHandle.close +paramiko.SSHClient.close +paramiko.Transport.close +paramiko.buffered_pipe.BufferedPipe.close +paramiko.pipe.PosixPipe.close +paramiko.pipe.WindowsPipe.close +paramiko.win_pageant.PageantConnection.close" class="py-name" href="#" onclick="return doclink('link-58', 'close', 'link-57');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt> +<a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">folder_table</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt> +</div><a name="L122"></a><tt class="py-lineno">122</tt> <tt class="py-line"> </tt> +<a name="SFTPServer.convert_errno"></a><div id="SFTPServer.convert_errno-def"><a name="L123"></a><tt class="py-lineno">123</tt> <a class="py-toggle" href="#" id="SFTPServer.convert_errno-toggle" onclick="return toggle('SFTPServer.convert_errno');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#convert_errno">convert_errno</a><tt class="py-op">(</tt><tt class="py-param">e</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer.convert_errno-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer.convert_errno-expanded"><a name="L124"></a><tt class="py-lineno">124</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt> +<a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"><tt class="py-docstring"> Convert an errno value (as from an C{OSError} or C{IOError}) into a</tt> </tt> +<a name="L126"></a><tt class="py-lineno">126</tt> <tt class="py-line"><tt class="py-docstring"> standard SFTP result code. This is a convenience function for trapping</tt> </tt> +<a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"><tt class="py-docstring"> exceptions in server code and returning an appropriate result.</tt> </tt> +<a name="L128"></a><tt class="py-lineno">128</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt> +<a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"><tt class="py-docstring"> @param e: an errno code, as from C{OSError.errno}.</tt> </tt> +<a name="L130"></a><tt class="py-lineno">130</tt> <tt class="py-line"><tt class="py-docstring"> @type e: int</tt> </tt> +<a name="L131"></a><tt class="py-lineno">131</tt> <tt class="py-line"><tt class="py-docstring"> @return: an SFTP error code like L{SFTP_NO_SUCH_FILE}.</tt> </tt> +<a name="L132"></a><tt class="py-lineno">132</tt> <tt class="py-line"><tt class="py-docstring"> @rtype: int</tt> </tt> +<a name="L133"></a><tt class="py-lineno">133</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L134"></a><tt class="py-lineno">134</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">e</tt> <tt class="py-op">==</tt> <tt class="py-name">errno</tt><tt class="py-op">.</tt><tt class="py-name">EACCES</tt><tt class="py-op">:</tt> </tt> +<a name="L135"></a><tt class="py-lineno">135</tt> <tt class="py-line"> <tt class="py-comment"># permission denied</tt> </tt> +<a name="L136"></a><tt class="py-lineno">136</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">return</tt> <tt id="link-59" class="py-name" targets="Variable paramiko.sftp.SFTP_PERMISSION_DENIED=paramiko.sftp-module.html#SFTP_PERMISSION_DENIED,Variable paramiko.sftp_attr.SFTP_PERMISSION_DENIED=paramiko.sftp_attr-module.html#SFTP_PERMISSION_DENIED,Variable paramiko.sftp_client.SFTP_PERMISSION_DENIED=paramiko.sftp_client-module.html#SFTP_PERMISSION_DENIED,Variable paramiko.sftp_file.SFTP_PERMISSION_DENIED=paramiko.sftp_file-module.html#SFTP_PERMISSION_DENIED,Variable paramiko.sftp_handle.SFTP_PERMISSION_DENIED=paramiko.sftp_handle-module.html#SFTP_PERMISSION_DENIED,Variable paramiko.sftp_server.SFTP_PERMISSION_DENIED=paramiko.sftp_server-module.html#SFTP_PERMISSION_DENIED,Variable paramiko.sftp_si.SFTP_PERMISSION_DENIED=paramiko.sftp_si-module.html#SFTP_PERMISSION_DENIED"><a title="paramiko.sftp.SFTP_PERMISSION_DENIED +paramiko.sftp_attr.SFTP_PERMISSION_DENIED +paramiko.sftp_client.SFTP_PERMISSION_DENIED +paramiko.sftp_file.SFTP_PERMISSION_DENIED +paramiko.sftp_handle.SFTP_PERMISSION_DENIED +paramiko.sftp_server.SFTP_PERMISSION_DENIED +paramiko.sftp_si.SFTP_PERMISSION_DENIED" class="py-name" href="#" onclick="return doclink('link-59', 'SFTP_PERMISSION_DENIED', 'link-59');">SFTP_PERMISSION_DENIED</a></tt> </tt> +<a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-op">(</tt><tt class="py-name">e</tt> <tt class="py-op">==</tt> <tt class="py-name">errno</tt><tt class="py-op">.</tt><tt class="py-name">ENOENT</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">e</tt> <tt class="py-op">==</tt> <tt class="py-name">errno</tt><tt class="py-op">.</tt><tt class="py-name">ENOTDIR</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"> <tt class="py-comment"># no such file</tt> </tt> +<a name="L139"></a><tt class="py-lineno">139</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">return</tt> <tt id="link-60" class="py-name" targets="Variable paramiko.sftp.SFTP_NO_SUCH_FILE=paramiko.sftp-module.html#SFTP_NO_SUCH_FILE,Variable paramiko.sftp_attr.SFTP_NO_SUCH_FILE=paramiko.sftp_attr-module.html#SFTP_NO_SUCH_FILE,Variable paramiko.sftp_client.SFTP_NO_SUCH_FILE=paramiko.sftp_client-module.html#SFTP_NO_SUCH_FILE,Variable paramiko.sftp_file.SFTP_NO_SUCH_FILE=paramiko.sftp_file-module.html#SFTP_NO_SUCH_FILE,Variable paramiko.sftp_handle.SFTP_NO_SUCH_FILE=paramiko.sftp_handle-module.html#SFTP_NO_SUCH_FILE,Variable paramiko.sftp_server.SFTP_NO_SUCH_FILE=paramiko.sftp_server-module.html#SFTP_NO_SUCH_FILE,Variable paramiko.sftp_si.SFTP_NO_SUCH_FILE=paramiko.sftp_si-module.html#SFTP_NO_SUCH_FILE"><a title="paramiko.sftp.SFTP_NO_SUCH_FILE +paramiko.sftp_attr.SFTP_NO_SUCH_FILE +paramiko.sftp_client.SFTP_NO_SUCH_FILE +paramiko.sftp_file.SFTP_NO_SUCH_FILE +paramiko.sftp_handle.SFTP_NO_SUCH_FILE +paramiko.sftp_server.SFTP_NO_SUCH_FILE +paramiko.sftp_si.SFTP_NO_SUCH_FILE" class="py-name" href="#" onclick="return doclink('link-60', 'SFTP_NO_SUCH_FILE', 'link-60');">SFTP_NO_SUCH_FILE</a></tt> </tt> +<a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt id="link-61" class="py-name"><a title="paramiko.sftp.SFTP_FAILURE +paramiko.sftp_attr.SFTP_FAILURE +paramiko.sftp_client.SFTP_FAILURE +paramiko.sftp_file.SFTP_FAILURE +paramiko.sftp_handle.SFTP_FAILURE +paramiko.sftp_server.SFTP_FAILURE +paramiko.sftp_si.SFTP_FAILURE" class="py-name" href="#" onclick="return doclink('link-61', 'SFTP_FAILURE', 'link-52');">SFTP_FAILURE</a></tt> </tt> +</div><a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line"> <tt id="link-62" class="py-name" targets="Static Method paramiko.SFTPServer.convert_errno()=paramiko.SFTPServer-class.html#convert_errno"><a title="paramiko.SFTPServer.convert_errno" class="py-name" href="#" onclick="return doclink('link-62', 'convert_errno', 'link-62');">convert_errno</a></tt> <tt class="py-op">=</tt> <tt class="py-name">staticmethod</tt><tt class="py-op">(</tt><tt id="link-63" class="py-name"><a title="paramiko.SFTPServer.convert_errno" class="py-name" href="#" onclick="return doclink('link-63', 'convert_errno', 'link-62');">convert_errno</a></tt><tt class="py-op">)</tt> </tt> +<a name="L143"></a><tt class="py-lineno">143</tt> <tt class="py-line"> </tt> +<a name="SFTPServer.set_file_attr"></a><div id="SFTPServer.set_file_attr-def"><a name="L144"></a><tt class="py-lineno">144</tt> <a class="py-toggle" href="#" id="SFTPServer.set_file_attr-toggle" onclick="return toggle('SFTPServer.set_file_attr');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#set_file_attr">set_file_attr</a><tt class="py-op">(</tt><tt class="py-param">filename</tt><tt class="py-op">,</tt> <tt class="py-param">attr</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer.set_file_attr-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer.set_file_attr-expanded"><a name="L145"></a><tt class="py-lineno">145</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt> +<a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"><tt class="py-docstring"> Change a file's attributes on the local filesystem. The contents of</tt> </tt> +<a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"><tt class="py-docstring"> C{attr} are used to change the permissions, owner, group ownership,</tt> </tt> +<a name="L148"></a><tt class="py-lineno">148</tt> <tt class="py-line"><tt class="py-docstring"> and/or modification & access time of the file, depending on which</tt> </tt> +<a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line"><tt class="py-docstring"> attributes are present in C{attr}.</tt> </tt> +<a name="L150"></a><tt class="py-lineno">150</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt> +<a name="L151"></a><tt class="py-lineno">151</tt> <tt class="py-line"><tt class="py-docstring"> This is meant to be a handy helper function for translating SFTP file</tt> </tt> +<a name="L152"></a><tt class="py-lineno">152</tt> <tt class="py-line"><tt class="py-docstring"> requests into local file operations.</tt> </tt> +<a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"><tt class="py-docstring"> </tt> </tt> +<a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"><tt class="py-docstring"> @param filename: name of the file to alter (should usually be an</tt> </tt> +<a name="L155"></a><tt class="py-lineno">155</tt> <tt class="py-line"><tt class="py-docstring"> absolute path).</tt> </tt> +<a name="L156"></a><tt class="py-lineno">156</tt> <tt class="py-line"><tt class="py-docstring"> @type filename: str</tt> </tt> +<a name="L157"></a><tt class="py-lineno">157</tt> <tt class="py-line"><tt class="py-docstring"> @param attr: attributes to change.</tt> </tt> +<a name="L158"></a><tt class="py-lineno">158</tt> <tt class="py-line"><tt class="py-docstring"> @type attr: L{SFTPAttributes}</tt> </tt> +<a name="L159"></a><tt class="py-lineno">159</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">platform</tt> <tt class="py-op">!=</tt> <tt class="py-string">'win32'</tt><tt class="py-op">:</tt> </tt> +<a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line"> <tt class="py-comment"># mode operations are meaningless on win32</tt> </tt> +<a name="L162"></a><tt class="py-lineno">162</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-keyword">if</tt> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt class="py-name">_flags</tt> <tt class="py-op">&</tt> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name" targets="Variable paramiko.SFTPAttributes.FLAG_PERMISSIONS=paramiko.SFTPAttributes-class.html#FLAG_PERMISSIONS"><a title="paramiko.SFTPAttributes.FLAG_PERMISSIONS" class="py-name" href="#" onclick="return doclink('link-64', 'FLAG_PERMISSIONS', 'link-64');">FLAG_PERMISSIONS</a></tt><tt class="py-op">:</tt> </tt> +<a name="L163"></a><tt class="py-lineno">163</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name" targets="Method paramiko.SFTPClient.chmod()=paramiko.SFTPClient-class.html#chmod,Method paramiko.SFTPFile.chmod()=paramiko.SFTPFile-class.html#chmod"><a title="paramiko.SFTPClient.chmod +paramiko.SFTPFile.chmod" class="py-name" href="#" onclick="return doclink('link-65', 'chmod', 'link-65');">chmod</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt class="py-name">st_mode</tt><tt class="py-op">)</tt> </tt> +<a name="L164"></a><tt class="py-lineno">164</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt class="py-name">_flags</tt> <tt class="py-op">&</tt> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-66" class="py-name" targets="Variable paramiko.SFTPAttributes.FLAG_UIDGID=paramiko.SFTPAttributes-class.html#FLAG_UIDGID"><a title="paramiko.SFTPAttributes.FLAG_UIDGID" class="py-name" href="#" onclick="return doclink('link-66', 'FLAG_UIDGID', 'link-66');">FLAG_UIDGID</a></tt><tt class="py-op">:</tt> </tt> +<a name="L165"></a><tt class="py-lineno">165</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-67" class="py-name" targets="Method paramiko.SFTPClient.chown()=paramiko.SFTPClient-class.html#chown,Method paramiko.SFTPFile.chown()=paramiko.SFTPFile-class.html#chown"><a title="paramiko.SFTPClient.chown +paramiko.SFTPFile.chown" class="py-name" href="#" onclick="return doclink('link-67', 'chown', 'link-67');">chown</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt class="py-name">st_uid</tt><tt class="py-op">,</tt> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt class="py-name">st_gid</tt><tt class="py-op">)</tt> </tt> +<a name="L166"></a><tt class="py-lineno">166</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt class="py-name">_flags</tt> <tt class="py-op">&</tt> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name" targets="Variable paramiko.SFTPAttributes.FLAG_AMTIME=paramiko.SFTPAttributes-class.html#FLAG_AMTIME"><a title="paramiko.SFTPAttributes.FLAG_AMTIME" class="py-name" href="#" onclick="return doclink('link-68', 'FLAG_AMTIME', 'link-68');">FLAG_AMTIME</a></tt><tt class="py-op">:</tt> </tt> +<a name="L167"></a><tt class="py-lineno">167</tt> <tt class="py-line"> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name" targets="Method paramiko.SFTPClient.utime()=paramiko.SFTPClient-class.html#utime,Method paramiko.SFTPFile.utime()=paramiko.SFTPFile-class.html#utime"><a title="paramiko.SFTPClient.utime +paramiko.SFTPFile.utime" class="py-name" href="#" onclick="return doclink('link-69', 'utime', 'link-69');">utime</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">attr</tt><tt class="py-op">.</tt><tt class="py-name">st_atime</tt><tt class="py-op">,</tt> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt class="py-name">st_mtime</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L168"></a><tt class="py-lineno">168</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt class="py-name">_flags</tt> <tt class="py-op">&</tt> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name" targets="Variable paramiko.SFTPAttributes.FLAG_SIZE=paramiko.SFTPAttributes-class.html#FLAG_SIZE"><a title="paramiko.SFTPAttributes.FLAG_SIZE" class="py-name" href="#" onclick="return doclink('link-70', 'FLAG_SIZE', 'link-70');">FLAG_SIZE</a></tt><tt class="py-op">:</tt> </tt> +<a name="L169"></a><tt class="py-lineno">169</tt> <tt class="py-line"> <tt id="link-71" class="py-name" targets="Method paramiko.SFTPServerInterface.open()=paramiko.SFTPServerInterface-class.html#open"><a title="paramiko.SFTPServerInterface.open" class="py-name" href="#" onclick="return doclink('link-71', 'open', 'link-71');">open</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">,</tt> <tt class="py-string">'w+'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-72" class="py-name" targets="Method paramiko.SFTPClient.truncate()=paramiko.SFTPClient-class.html#truncate,Method paramiko.SFTPFile.truncate()=paramiko.SFTPFile-class.html#truncate"><a title="paramiko.SFTPClient.truncate +paramiko.SFTPFile.truncate" class="py-name" href="#" onclick="return doclink('link-72', 'truncate', 'link-72');">truncate</a></tt><tt class="py-op">(</tt><tt class="py-name">attr</tt><tt class="py-op">.</tt><tt class="py-name">st_size</tt><tt class="py-op">)</tt> </tt> +</div><a name="L170"></a><tt class="py-lineno">170</tt> <tt class="py-line"> <tt id="link-73" class="py-name" targets="Static Method paramiko.SFTPServer.set_file_attr()=paramiko.SFTPServer-class.html#set_file_attr"><a title="paramiko.SFTPServer.set_file_attr" class="py-name" href="#" onclick="return doclink('link-73', 'set_file_attr', 'link-73');">set_file_attr</a></tt> <tt class="py-op">=</tt> <tt class="py-name">staticmethod</tt><tt class="py-op">(</tt><tt id="link-74" class="py-name"><a title="paramiko.SFTPServer.set_file_attr" class="py-name" href="#" onclick="return doclink('link-74', 'set_file_attr', 'link-73');">set_file_attr</a></tt><tt class="py-op">)</tt> </tt> +<a name="L171"></a><tt class="py-lineno">171</tt> <tt class="py-line"> </tt> +<a name="L172"></a><tt class="py-lineno">172</tt> <tt class="py-line"> </tt> +<a name="L173"></a><tt class="py-lineno">173</tt> <tt class="py-line"> <tt class="py-comment">### internals...</tt> </tt> +<a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"><tt class="py-comment"></tt> </tt> +<a name="L175"></a><tt class="py-lineno">175</tt> <tt class="py-line"> </tt> +<a name="SFTPServer._response"></a><div id="SFTPServer._response-def"><a name="L176"></a><tt class="py-lineno">176</tt> <a class="py-toggle" href="#" id="SFTPServer._response-toggle" onclick="return toggle('SFTPServer._response');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#_response">_response</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request_number</tt><tt class="py-op">,</tt> <tt class="py-param">t</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">arg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer._response-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer._response-expanded"><a name="L177"></a><tt class="py-lineno">177</tt> <tt class="py-line"> <tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt id="link-75" class="py-name"><a title="paramiko.Message" class="py-name" href="#" onclick="return doclink('link-75', 'Message', 'link-46');">Message</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L178"></a><tt class="py-lineno">178</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name" targets="Method paramiko.Message.add_int()=paramiko.Message-class.html#add_int"><a title="paramiko.Message.add_int" class="py-name" href="#" onclick="return doclink('link-76', 'add_int', 'link-76');">add_int</a></tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">)</tt> </tt> +<a name="L179"></a><tt class="py-lineno">179</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">arg</tt><tt class="py-op">:</tt> </tt> +<a name="L180"></a><tt class="py-lineno">180</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-name">int</tt><tt class="py-op">:</tt> </tt> +<a name="L181"></a><tt class="py-lineno">181</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-77" class="py-name"><a title="paramiko.Message.add_int" class="py-name" href="#" onclick="return doclink('link-77', 'add_int', 'link-76');">add_int</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt> +<a name="L182"></a><tt class="py-lineno">182</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-name">long</tt><tt class="py-op">:</tt> </tt> +<a name="L183"></a><tt class="py-lineno">183</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-78" class="py-name" targets="Method paramiko.Message.add_int64()=paramiko.Message-class.html#add_int64"><a title="paramiko.Message.add_int64" class="py-name" href="#" onclick="return doclink('link-78', 'add_int64', 'link-78');">add_int64</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt> +<a name="L184"></a><tt class="py-lineno">184</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-name">str</tt><tt class="py-op">:</tt> </tt> +<a name="L185"></a><tt class="py-lineno">185</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-79" class="py-name" targets="Method paramiko.Message.add_string()=paramiko.Message-class.html#add_string"><a title="paramiko.Message.add_string" class="py-name" href="#" onclick="return doclink('link-79', 'add_string', 'link-79');">add_string</a></tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt> +<a name="L186"></a><tt class="py-lineno">186</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt id="link-80" class="py-name" targets="Class paramiko.SFTPAttributes=paramiko.SFTPAttributes-class.html"><a title="paramiko.SFTPAttributes" class="py-name" href="#" onclick="return doclink('link-80', 'SFTPAttributes', 'link-80');">SFTPAttributes</a></tt><tt class="py-op">:</tt> </tt> +<a name="L187"></a><tt class="py-lineno">187</tt> <tt class="py-line"> <tt class="py-name">item</tt><tt class="py-op">.</tt><tt class="py-name">_pack</tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt> +<a name="L188"></a><tt class="py-lineno">188</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L189"></a><tt class="py-lineno">189</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">Exception</tt><tt class="py-op">(</tt><tt class="py-string">'unknown type for '</tt> <tt class="py-op">+</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">' type '</tt> <tt class="py-op">+</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L190"></a><tt class="py-lineno">190</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_packet</tt><tt class="py-op">(</tt><tt class="py-name">t</tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +</div><a name="L191"></a><tt class="py-lineno">191</tt> <tt class="py-line"> </tt> +<a name="SFTPServer._send_handle_response"></a><div id="SFTPServer._send_handle_response-def"><a name="L192"></a><tt class="py-lineno">192</tt> <a class="py-toggle" href="#" id="SFTPServer._send_handle_response-toggle" onclick="return toggle('SFTPServer._send_handle_response');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#_send_handle_response">_send_handle_response</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request_number</tt><tt class="py-op">,</tt> <tt class="py-param">handle</tt><tt class="py-op">,</tt> <tt class="py-param">folder</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer._send_handle_response-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer._send_handle_response-expanded"><a name="L193"></a><tt class="py-lineno">193</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">issubclass</tt><tt class="py-op">(</tt><tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">handle</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-81" class="py-name" targets="Class paramiko.SFTPHandle=paramiko.SFTPHandle-class.html"><a title="paramiko.SFTPHandle" class="py-name" href="#" onclick="return doclink('link-81', 'SFTPHandle', 'link-81');">SFTPHandle</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L194"></a><tt class="py-lineno">194</tt> <tt class="py-line"> <tt class="py-comment"># must be error code</tt> </tt> +<a name="L195"></a><tt class="py-lineno">195</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">handle</tt><tt class="py-op">)</tt> </tt> +<a name="L196"></a><tt class="py-lineno">196</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L197"></a><tt class="py-lineno">197</tt> <tt class="py-line"> <tt class="py-name">handle</tt><tt class="py-op">.</tt><tt class="py-name">_set_name</tt><tt class="py-op">(</tt><tt class="py-string">'hx%d'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">next_handle</tt><tt class="py-op">)</tt> </tt> +<a name="L198"></a><tt class="py-lineno">198</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">next_handle</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt> +<a name="L199"></a><tt class="py-lineno">199</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">folder</tt><tt class="py-op">:</tt> </tt> +<a name="L200"></a><tt class="py-lineno">200</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">folder_table</tt><tt class="py-op">[</tt><tt class="py-name">handle</tt><tt class="py-op">.</tt><tt class="py-name">_get_name</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">handle</tt> </tt> +<a name="L201"></a><tt class="py-lineno">201</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L202"></a><tt class="py-lineno">202</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">[</tt><tt class="py-name">handle</tt><tt class="py-op">.</tt><tt class="py-name">_get_name</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">handle</tt> </tt> +<a name="L203"></a><tt class="py-lineno">203</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_response</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-82" class="py-name" targets="Variable paramiko.sftp.CMD_HANDLE=paramiko.sftp-module.html#CMD_HANDLE,Variable paramiko.sftp_attr.CMD_HANDLE=paramiko.sftp_attr-module.html#CMD_HANDLE,Variable paramiko.sftp_client.CMD_HANDLE=paramiko.sftp_client-module.html#CMD_HANDLE,Variable paramiko.sftp_file.CMD_HANDLE=paramiko.sftp_file-module.html#CMD_HANDLE,Variable paramiko.sftp_handle.CMD_HANDLE=paramiko.sftp_handle-module.html#CMD_HANDLE,Variable paramiko.sftp_server.CMD_HANDLE=paramiko.sftp_server-module.html#CMD_HANDLE,Variable paramiko.sftp_si.CMD_HANDLE=paramiko.sftp_si-module.html#CMD_HANDLE"><a title="paramiko.sftp.CMD_HANDLE +paramiko.sftp_attr.CMD_HANDLE +paramiko.sftp_client.CMD_HANDLE +paramiko.sftp_file.CMD_HANDLE +paramiko.sftp_handle.CMD_HANDLE +paramiko.sftp_server.CMD_HANDLE +paramiko.sftp_si.CMD_HANDLE" class="py-name" href="#" onclick="return doclink('link-82', 'CMD_HANDLE', 'link-82');">CMD_HANDLE</a></tt><tt class="py-op">,</tt> <tt class="py-name">handle</tt><tt class="py-op">.</tt><tt class="py-name">_get_name</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +</div><a name="L204"></a><tt class="py-lineno">204</tt> <tt class="py-line"> </tt> +<a name="SFTPServer._send_status"></a><div id="SFTPServer._send_status-def"><a name="L205"></a><tt class="py-lineno">205</tt> <a class="py-toggle" href="#" id="SFTPServer._send_status-toggle" onclick="return toggle('SFTPServer._send_status');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#_send_status">_send_status</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request_number</tt><tt class="py-op">,</tt> <tt class="py-param">code</tt><tt class="py-op">,</tt> <tt class="py-param">desc</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer._send_status-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer._send_status-expanded"><a name="L206"></a><tt class="py-lineno">206</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">desc</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt> +<a name="L207"></a><tt class="py-lineno">207</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt> +<a name="L208"></a><tt class="py-lineno">208</tt> <tt class="py-line"> <tt class="py-name">desc</tt> <tt class="py-op">=</tt> <tt id="link-83" class="py-name" targets="Variable paramiko.sftp.SFTP_DESC=paramiko.sftp-module.html#SFTP_DESC,Variable paramiko.sftp_attr.SFTP_DESC=paramiko.sftp_attr-module.html#SFTP_DESC,Variable paramiko.sftp_client.SFTP_DESC=paramiko.sftp_client-module.html#SFTP_DESC,Variable paramiko.sftp_file.SFTP_DESC=paramiko.sftp_file-module.html#SFTP_DESC,Variable paramiko.sftp_handle.SFTP_DESC=paramiko.sftp_handle-module.html#SFTP_DESC,Variable paramiko.sftp_server.SFTP_DESC=paramiko.sftp_server-module.html#SFTP_DESC,Variable paramiko.sftp_si.SFTP_DESC=paramiko.sftp_si-module.html#SFTP_DESC"><a title="paramiko.sftp.SFTP_DESC +paramiko.sftp_attr.SFTP_DESC +paramiko.sftp_client.SFTP_DESC +paramiko.sftp_file.SFTP_DESC +paramiko.sftp_handle.SFTP_DESC +paramiko.sftp_server.SFTP_DESC +paramiko.sftp_si.SFTP_DESC" class="py-name" href="#" onclick="return doclink('link-83', 'SFTP_DESC', 'link-83');">SFTP_DESC</a></tt><tt class="py-op">[</tt><tt class="py-name">code</tt><tt class="py-op">]</tt> </tt> +<a name="L209"></a><tt class="py-lineno">209</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">IndexError</tt><tt class="py-op">:</tt> </tt> +<a name="L210"></a><tt class="py-lineno">210</tt> <tt class="py-line"> <tt class="py-name">desc</tt> <tt class="py-op">=</tt> <tt class="py-string">'Unknown'</tt> </tt> +<a name="L211"></a><tt class="py-lineno">211</tt> <tt class="py-line"> <tt class="py-comment"># some clients expect a "langauge" tag at the end (but don't mind it being blank)</tt> </tt> +<a name="L212"></a><tt class="py-lineno">212</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_response</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-84" class="py-name" targets="Variable paramiko.sftp.CMD_STATUS=paramiko.sftp-module.html#CMD_STATUS,Variable paramiko.sftp_attr.CMD_STATUS=paramiko.sftp_attr-module.html#CMD_STATUS,Variable paramiko.sftp_client.CMD_STATUS=paramiko.sftp_client-module.html#CMD_STATUS,Variable paramiko.sftp_file.CMD_STATUS=paramiko.sftp_file-module.html#CMD_STATUS,Variable paramiko.sftp_handle.CMD_STATUS=paramiko.sftp_handle-module.html#CMD_STATUS,Variable paramiko.sftp_server.CMD_STATUS=paramiko.sftp_server-module.html#CMD_STATUS,Variable paramiko.sftp_si.CMD_STATUS=paramiko.sftp_si-module.html#CMD_STATUS"><a title="paramiko.sftp.CMD_STATUS +paramiko.sftp_attr.CMD_STATUS +paramiko.sftp_client.CMD_STATUS +paramiko.sftp_file.CMD_STATUS +paramiko.sftp_handle.CMD_STATUS +paramiko.sftp_server.CMD_STATUS +paramiko.sftp_si.CMD_STATUS" class="py-name" href="#" onclick="return doclink('link-84', 'CMD_STATUS', 'link-84');">CMD_STATUS</a></tt><tt class="py-op">,</tt> <tt class="py-name">code</tt><tt class="py-op">,</tt> <tt class="py-name">desc</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt> </tt> +</div><a name="L213"></a><tt class="py-lineno">213</tt> <tt class="py-line"> </tt> +<a name="SFTPServer._open_folder"></a><div id="SFTPServer._open_folder-def"><a name="L214"></a><tt class="py-lineno">214</tt> <a class="py-toggle" href="#" id="SFTPServer._open_folder-toggle" onclick="return toggle('SFTPServer._open_folder');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#_open_folder">_open_folder</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request_number</tt><tt class="py-op">,</tt> <tt class="py-param">path</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer._open_folder-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer._open_folder-expanded"><a name="L215"></a><tt class="py-lineno">215</tt> <tt class="py-line"> <tt class="py-name">resp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-85', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-86" class="py-name" targets="Method paramiko.SFTPServerInterface.list_folder()=paramiko.SFTPServerInterface-class.html#list_folder"><a title="paramiko.SFTPServerInterface.list_folder" class="py-name" href="#" onclick="return doclink('link-86', 'list_folder', 'link-86');">list_folder</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt> +<a name="L216"></a><tt class="py-lineno">216</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">issubclass</tt><tt class="py-op">(</tt><tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">resp</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L217"></a><tt class="py-lineno">217</tt> <tt class="py-line"> <tt class="py-comment"># got an actual list of filenames in the folder</tt> </tt> +<a name="L218"></a><tt class="py-lineno">218</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt id="link-87" class="py-name"><a title="paramiko.SFTPHandle" class="py-name" href="#" onclick="return doclink('link-87', 'SFTPHandle', 'link-81');">SFTPHandle</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L219"></a><tt class="py-lineno">219</tt> <tt class="py-line"> <tt class="py-name">folder</tt><tt class="py-op">.</tt><tt class="py-name">_set_files</tt><tt class="py-op">(</tt><tt class="py-name">resp</tt><tt class="py-op">)</tt> </tt> +<a name="L220"></a><tt class="py-lineno">220</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_handle_response</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">folder</tt><tt class="py-op">,</tt> <tt class="py-name">True</tt><tt class="py-op">)</tt> </tt> +<a name="L221"></a><tt class="py-lineno">221</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L222"></a><tt class="py-lineno">222</tt> <tt class="py-line"> <tt class="py-comment"># must be an error code</tt> </tt> +<a name="L223"></a><tt class="py-lineno">223</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">resp</tt><tt class="py-op">)</tt> </tt> +</div><a name="L224"></a><tt class="py-lineno">224</tt> <tt class="py-line"> </tt> +<a name="SFTPServer._read_folder"></a><div id="SFTPServer._read_folder-def"><a name="L225"></a><tt class="py-lineno">225</tt> <a class="py-toggle" href="#" id="SFTPServer._read_folder-toggle" onclick="return toggle('SFTPServer._read_folder');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#_read_folder">_read_folder</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request_number</tt><tt class="py-op">,</tt> <tt class="py-param">folder</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer._read_folder-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer._read_folder-expanded"><a name="L226"></a><tt class="py-lineno">226</tt> <tt class="py-line"> <tt class="py-name">flist</tt> <tt class="py-op">=</tt> <tt class="py-name">folder</tt><tt class="py-op">.</tt><tt class="py-name">_get_next_files</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L227"></a><tt class="py-lineno">227</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">flist</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt> +<a name="L228"></a><tt class="py-lineno">228</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-88" class="py-name" targets="Variable paramiko.sftp.SFTP_EOF=paramiko.sftp-module.html#SFTP_EOF,Variable paramiko.sftp_attr.SFTP_EOF=paramiko.sftp_attr-module.html#SFTP_EOF,Variable paramiko.sftp_client.SFTP_EOF=paramiko.sftp_client-module.html#SFTP_EOF,Variable paramiko.sftp_file.SFTP_EOF=paramiko.sftp_file-module.html#SFTP_EOF,Variable paramiko.sftp_handle.SFTP_EOF=paramiko.sftp_handle-module.html#SFTP_EOF,Variable paramiko.sftp_server.SFTP_EOF=paramiko.sftp_server-module.html#SFTP_EOF,Variable paramiko.sftp_si.SFTP_EOF=paramiko.sftp_si-module.html#SFTP_EOF"><a title="paramiko.sftp.SFTP_EOF +paramiko.sftp_attr.SFTP_EOF +paramiko.sftp_client.SFTP_EOF +paramiko.sftp_file.SFTP_EOF +paramiko.sftp_handle.SFTP_EOF +paramiko.sftp_server.SFTP_EOF +paramiko.sftp_si.SFTP_EOF" class="py-name" href="#" onclick="return doclink('link-88', 'SFTP_EOF', 'link-88');">SFTP_EOF</a></tt><tt class="py-op">)</tt> </tt> +<a name="L229"></a><tt class="py-lineno">229</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L230"></a><tt class="py-lineno">230</tt> <tt class="py-line"> <tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt id="link-89" class="py-name"><a title="paramiko.Message" class="py-name" href="#" onclick="return doclink('link-89', 'Message', 'link-46');">Message</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L231"></a><tt class="py-lineno">231</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-90" class="py-name"><a title="paramiko.Message.add_int" class="py-name" href="#" onclick="return doclink('link-90', 'add_int', 'link-76');">add_int</a></tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">)</tt> </tt> +<a name="L232"></a><tt class="py-lineno">232</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="paramiko.Message.add_int" class="py-name" href="#" onclick="return doclink('link-91', 'add_int', 'link-76');">add_int</a></tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">flist</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L233"></a><tt class="py-lineno">233</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">attr</tt> <tt class="py-keyword">in</tt> <tt class="py-name">flist</tt><tt class="py-op">:</tt> </tt> +<a name="L234"></a><tt class="py-lineno">234</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="paramiko.Message.add_string" class="py-name" href="#" onclick="return doclink('link-92', 'add_string', 'link-79');">add_string</a></tt><tt class="py-op">(</tt><tt class="py-name">attr</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt> +<a name="L235"></a><tt class="py-lineno">235</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="paramiko.Message.add_string" class="py-name" href="#" onclick="return doclink('link-93', 'add_string', 'link-79');">add_string</a></tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L236"></a><tt class="py-lineno">236</tt> <tt class="py-line"> <tt class="py-name">attr</tt><tt class="py-op">.</tt><tt class="py-name">_pack</tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt> +<a name="L237"></a><tt class="py-lineno">237</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_packet</tt><tt class="py-op">(</tt><tt id="link-94" class="py-name" targets="Variable paramiko.sftp.CMD_NAME=paramiko.sftp-module.html#CMD_NAME,Variable paramiko.sftp_attr.CMD_NAME=paramiko.sftp_attr-module.html#CMD_NAME,Variable paramiko.sftp_client.CMD_NAME=paramiko.sftp_client-module.html#CMD_NAME,Variable paramiko.sftp_file.CMD_NAME=paramiko.sftp_file-module.html#CMD_NAME,Variable paramiko.sftp_handle.CMD_NAME=paramiko.sftp_handle-module.html#CMD_NAME,Variable paramiko.sftp_server.CMD_NAME=paramiko.sftp_server-module.html#CMD_NAME,Variable paramiko.sftp_si.CMD_NAME=paramiko.sftp_si-module.html#CMD_NAME"><a title="paramiko.sftp.CMD_NAME +paramiko.sftp_attr.CMD_NAME +paramiko.sftp_client.CMD_NAME +paramiko.sftp_file.CMD_NAME +paramiko.sftp_handle.CMD_NAME +paramiko.sftp_server.CMD_NAME +paramiko.sftp_si.CMD_NAME" class="py-name" href="#" onclick="return doclink('link-94', 'CMD_NAME', 'link-94');">CMD_NAME</a></tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +</div><a name="L238"></a><tt class="py-lineno">238</tt> <tt class="py-line"> </tt> +<a name="SFTPServer._check_file"></a><div id="SFTPServer._check_file-def"><a name="L239"></a><tt class="py-lineno">239</tt> <a class="py-toggle" href="#" id="SFTPServer._check_file-toggle" onclick="return toggle('SFTPServer._check_file');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#_check_file">_check_file</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">request_number</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer._check_file-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer._check_file-expanded"><a name="L240"></a><tt class="py-lineno">240</tt> <tt class="py-line"> <tt class="py-comment"># this extension actually comes from v6 protocol, but since it's an</tt> </tt> +<a name="L241"></a><tt class="py-lineno">241</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># extension, i feel like we can reasonably support it backported.</tt> </tt> +<a name="L242"></a><tt class="py-lineno">242</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># it's very useful for verifying uploaded files or checking for</tt> </tt> +<a name="L243"></a><tt class="py-lineno">243</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># rsync-like differences between local and remote files.</tt> </tt> +<a name="L244"></a><tt class="py-lineno">244</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">handle</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-95" class="py-name" targets="Method paramiko.Message.get_string()=paramiko.Message-class.html#get_string"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-95', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L245"></a><tt class="py-lineno">245</tt> <tt class="py-line"> <tt class="py-name">alg_list</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name" targets="Method paramiko.Message.get_list()=paramiko.Message-class.html#get_list"><a title="paramiko.Message.get_list" class="py-name" href="#" onclick="return doclink('link-96', 'get_list', 'link-96');">get_list</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L246"></a><tt class="py-lineno">246</tt> <tt class="py-line"> <tt class="py-name">start</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-97" class="py-name" targets="Method paramiko.Message.get_int64()=paramiko.Message-class.html#get_int64"><a title="paramiko.Message.get_int64" class="py-name" href="#" onclick="return doclink('link-97', 'get_int64', 'link-97');">get_int64</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L247"></a><tt class="py-lineno">247</tt> <tt class="py-line"> <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="paramiko.Message.get_int64" class="py-name" href="#" onclick="return doclink('link-98', 'get_int64', 'link-97');">get_int64</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L248"></a><tt class="py-lineno">248</tt> <tt class="py-line"> <tt class="py-name">block_size</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-99" class="py-name"><a title="paramiko.Message.get_int" class="py-name" href="#" onclick="return doclink('link-99', 'get_int', 'link-47');">get_int</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L249"></a><tt class="py-lineno">249</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">handle</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">:</tt> </tt> +<a name="L250"></a><tt class="py-lineno">250</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-100" class="py-name" targets="Variable paramiko.sftp.SFTP_BAD_MESSAGE=paramiko.sftp-module.html#SFTP_BAD_MESSAGE,Variable paramiko.sftp_attr.SFTP_BAD_MESSAGE=paramiko.sftp_attr-module.html#SFTP_BAD_MESSAGE,Variable paramiko.sftp_client.SFTP_BAD_MESSAGE=paramiko.sftp_client-module.html#SFTP_BAD_MESSAGE,Variable paramiko.sftp_file.SFTP_BAD_MESSAGE=paramiko.sftp_file-module.html#SFTP_BAD_MESSAGE,Variable paramiko.sftp_handle.SFTP_BAD_MESSAGE=paramiko.sftp_handle-module.html#SFTP_BAD_MESSAGE,Variable paramiko.sftp_server.SFTP_BAD_MESSAGE=paramiko.sftp_server-module.html#SFTP_BAD_MESSAGE,Variable paramiko.sftp_si.SFTP_BAD_MESSAGE=paramiko.sftp_si-module.html#SFTP_BAD_MESSAGE"><a title="paramiko.sftp.SFTP_BAD_MESSAGE +paramiko.sftp_attr.SFTP_BAD_MESSAGE +paramiko.sftp_client.SFTP_BAD_MESSAGE +paramiko.sftp_file.SFTP_BAD_MESSAGE +paramiko.sftp_handle.SFTP_BAD_MESSAGE +paramiko.sftp_server.SFTP_BAD_MESSAGE +paramiko.sftp_si.SFTP_BAD_MESSAGE" class="py-name" href="#" onclick="return doclink('link-100', 'SFTP_BAD_MESSAGE', 'link-100');">SFTP_BAD_MESSAGE</a></tt><tt class="py-op">,</tt> <tt class="py-string">'Invalid handle'</tt><tt class="py-op">)</tt> </tt> +<a name="L251"></a><tt class="py-lineno">251</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L252"></a><tt class="py-lineno">252</tt> <tt class="py-line"> <tt class="py-name">f</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">[</tt><tt class="py-name">handle</tt><tt class="py-op">]</tt> </tt> +<a name="L253"></a><tt class="py-lineno">253</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">x</tt> <tt class="py-keyword">in</tt> <tt class="py-name">alg_list</tt><tt class="py-op">:</tt> </tt> +<a name="L254"></a><tt class="py-lineno">254</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">x</tt> <tt class="py-keyword">in</tt> <tt id="link-101" class="py-name"><a title="paramiko.sftp_server._hash_class" class="py-name" href="#" onclick="return doclink('link-101', '_hash_class', 'link-11');">_hash_class</a></tt><tt class="py-op">:</tt> </tt> +<a name="L255"></a><tt class="py-lineno">255</tt> <tt class="py-line"> <tt class="py-name">algname</tt> <tt class="py-op">=</tt> <tt class="py-name">x</tt> </tt> +<a name="L256"></a><tt class="py-lineno">256</tt> <tt class="py-line"> <tt class="py-name">alg</tt> <tt class="py-op">=</tt> <tt id="link-102" class="py-name"><a title="paramiko.sftp_server._hash_class" class="py-name" href="#" onclick="return doclink('link-102', '_hash_class', 'link-11');">_hash_class</a></tt><tt class="py-op">[</tt><tt class="py-name">x</tt><tt class="py-op">]</tt> </tt> +<a name="L257"></a><tt class="py-lineno">257</tt> <tt class="py-line"> <tt class="py-keyword">break</tt> </tt> +<a name="L258"></a><tt class="py-lineno">258</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L259"></a><tt class="py-lineno">259</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-103" class="py-name"><a title="paramiko.sftp.SFTP_FAILURE +paramiko.sftp_attr.SFTP_FAILURE +paramiko.sftp_client.SFTP_FAILURE +paramiko.sftp_file.SFTP_FAILURE +paramiko.sftp_handle.SFTP_FAILURE +paramiko.sftp_server.SFTP_FAILURE +paramiko.sftp_si.SFTP_FAILURE" class="py-name" href="#" onclick="return doclink('link-103', 'SFTP_FAILURE', 'link-52');">SFTP_FAILURE</a></tt><tt class="py-op">,</tt> <tt class="py-string">'No supported hash types found'</tt><tt class="py-op">)</tt> </tt> +<a name="L260"></a><tt class="py-lineno">260</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L261"></a><tt class="py-lineno">261</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">length</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt> +<a name="L262"></a><tt class="py-lineno">262</tt> <tt class="py-line"> <tt class="py-name">st</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-104" class="py-name" targets="Method paramiko.SFTPClient.stat()=paramiko.SFTPClient-class.html#stat,Method paramiko.SFTPFile.stat()=paramiko.SFTPFile-class.html#stat,Method paramiko.SFTPHandle.stat()=paramiko.SFTPHandle-class.html#stat,Method paramiko.SFTPServerInterface.stat()=paramiko.SFTPServerInterface-class.html#stat"><a title="paramiko.SFTPClient.stat +paramiko.SFTPFile.stat +paramiko.SFTPHandle.stat +paramiko.SFTPServerInterface.stat" class="py-name" href="#" onclick="return doclink('link-104', 'stat', 'link-104');">stat</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L263"></a><tt class="py-lineno">263</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">issubclass</tt><tt class="py-op">(</tt><tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">st</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-105" class="py-name"><a title="paramiko.SFTPAttributes" class="py-name" href="#" onclick="return doclink('link-105', 'SFTPAttributes', 'link-80');">SFTPAttributes</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L264"></a><tt class="py-lineno">264</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">st</tt><tt class="py-op">,</tt> <tt class="py-string">'Unable to stat file'</tt><tt class="py-op">)</tt> </tt> +<a name="L265"></a><tt class="py-lineno">265</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L266"></a><tt class="py-lineno">266</tt> <tt class="py-line"> <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt class="py-name">st</tt><tt class="py-op">.</tt><tt class="py-name">st_size</tt> <tt class="py-op">-</tt> <tt class="py-name">start</tt> </tt> +<a name="L267"></a><tt class="py-lineno">267</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">block_size</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt> +<a name="L268"></a><tt class="py-lineno">268</tt> <tt class="py-line"> <tt class="py-name">block_size</tt> <tt class="py-op">=</tt> <tt class="py-name">length</tt> </tt> +<a name="L269"></a><tt class="py-lineno">269</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">block_size</tt> <tt class="py-op"><</tt> <tt class="py-number">256</tt><tt class="py-op">:</tt> </tt> +<a name="L270"></a><tt class="py-lineno">270</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-106" class="py-name"><a title="paramiko.sftp.SFTP_FAILURE +paramiko.sftp_attr.SFTP_FAILURE +paramiko.sftp_client.SFTP_FAILURE +paramiko.sftp_file.SFTP_FAILURE +paramiko.sftp_handle.SFTP_FAILURE +paramiko.sftp_server.SFTP_FAILURE +paramiko.sftp_si.SFTP_FAILURE" class="py-name" href="#" onclick="return doclink('link-106', 'SFTP_FAILURE', 'link-52');">SFTP_FAILURE</a></tt><tt class="py-op">,</tt> <tt class="py-string">'Block size too small'</tt><tt class="py-op">)</tt> </tt> +<a name="L271"></a><tt class="py-lineno">271</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L272"></a><tt class="py-lineno">272</tt> <tt class="py-line"> </tt> +<a name="L273"></a><tt class="py-lineno">273</tt> <tt class="py-line"> <tt class="py-name">sum_out</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt> +<a name="L274"></a><tt class="py-lineno">274</tt> <tt class="py-line"> <tt class="py-name">offset</tt> <tt class="py-op">=</tt> <tt class="py-name">start</tt> </tt> +<a name="L275"></a><tt class="py-lineno">275</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-name">offset</tt> <tt class="py-op"><</tt> <tt class="py-name">start</tt> <tt class="py-op">+</tt> <tt class="py-name">length</tt><tt class="py-op">:</tt> </tt> +<a name="L276"></a><tt class="py-lineno">276</tt> <tt class="py-line"> <tt class="py-name">blocklen</tt> <tt class="py-op">=</tt> <tt class="py-name">min</tt><tt class="py-op">(</tt><tt class="py-name">block_size</tt><tt class="py-op">,</tt> <tt class="py-name">start</tt> <tt class="py-op">+</tt> <tt class="py-name">length</tt> <tt class="py-op">-</tt> <tt class="py-name">offset</tt><tt class="py-op">)</tt> </tt> +<a name="L277"></a><tt class="py-lineno">277</tt> <tt class="py-line"> <tt class="py-comment"># don't try to read more than about 64KB at a time</tt> </tt> +<a name="L278"></a><tt class="py-lineno">278</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">chunklen</tt> <tt class="py-op">=</tt> <tt class="py-name">min</tt><tt class="py-op">(</tt><tt class="py-name">blocklen</tt><tt class="py-op">,</tt> <tt class="py-number">65536</tt><tt class="py-op">)</tt> </tt> +<a name="L279"></a><tt class="py-lineno">279</tt> <tt class="py-line"> <tt class="py-name">count</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt> +<a name="L280"></a><tt class="py-lineno">280</tt> <tt class="py-line"> <tt class="py-name">hash_obj</tt> <tt class="py-op">=</tt> <tt class="py-name">alg</tt><tt class="py-op">.</tt><tt class="py-name">new</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L281"></a><tt class="py-lineno">281</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-name">count</tt> <tt class="py-op"><</tt> <tt class="py-name">blocklen</tt><tt class="py-op">:</tt> </tt> +<a name="L282"></a><tt class="py-lineno">282</tt> <tt class="py-line"> <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">f</tt><tt class="py-op">.</tt><tt id="link-107" class="py-name" targets="Method paramiko.BufferedFile.read()=paramiko.BufferedFile-class.html#read,Method paramiko.SFTPHandle.read()=paramiko.SFTPHandle-class.html#read,Method paramiko.buffered_pipe.BufferedPipe.read()=paramiko.buffered_pipe.BufferedPipe-class.html#read"><a title="paramiko.BufferedFile.read +paramiko.SFTPHandle.read +paramiko.buffered_pipe.BufferedPipe.read" class="py-name" href="#" onclick="return doclink('link-107', 'read', 'link-107');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">offset</tt><tt class="py-op">,</tt> <tt class="py-name">chunklen</tt><tt class="py-op">)</tt> </tt> +<a name="L283"></a><tt class="py-lineno">283</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-name">str</tt><tt class="py-op">:</tt> </tt> +<a name="L284"></a><tt class="py-lineno">284</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-string">'Unable to hash file'</tt><tt class="py-op">)</tt> </tt> +<a name="L285"></a><tt class="py-lineno">285</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L286"></a><tt class="py-lineno">286</tt> <tt class="py-line"> <tt class="py-name">hash_obj</tt><tt class="py-op">.</tt><tt class="py-name">update</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt> +<a name="L287"></a><tt class="py-lineno">287</tt> <tt class="py-line"> <tt class="py-name">count</tt> <tt class="py-op">+=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt> +<a name="L288"></a><tt class="py-lineno">288</tt> <tt class="py-line"> <tt class="py-name">offset</tt> <tt class="py-op">+=</tt> <tt class="py-name">count</tt> </tt> +<a name="L289"></a><tt class="py-lineno">289</tt> <tt class="py-line"> <tt class="py-name">sum_out</tt> <tt class="py-op">+=</tt> <tt class="py-name">hash_obj</tt><tt class="py-op">.</tt><tt class="py-name">digest</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L290"></a><tt class="py-lineno">290</tt> <tt class="py-line"> </tt> +<a name="L291"></a><tt class="py-lineno">291</tt> <tt class="py-line"> <tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt id="link-108" class="py-name"><a title="paramiko.Message" class="py-name" href="#" onclick="return doclink('link-108', 'Message', 'link-46');">Message</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L292"></a><tt class="py-lineno">292</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-109" class="py-name"><a title="paramiko.Message.add_int" class="py-name" href="#" onclick="return doclink('link-109', 'add_int', 'link-76');">add_int</a></tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">)</tt> </tt> +<a name="L293"></a><tt class="py-lineno">293</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-110" class="py-name"><a title="paramiko.Message.add_string" class="py-name" href="#" onclick="return doclink('link-110', 'add_string', 'link-79');">add_string</a></tt><tt class="py-op">(</tt><tt class="py-string">'check-file'</tt><tt class="py-op">)</tt> </tt> +<a name="L294"></a><tt class="py-lineno">294</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-111" class="py-name"><a title="paramiko.Message.add_string" class="py-name" href="#" onclick="return doclink('link-111', 'add_string', 'link-79');">add_string</a></tt><tt class="py-op">(</tt><tt class="py-name">algname</tt><tt class="py-op">)</tt> </tt> +<a name="L295"></a><tt class="py-lineno">295</tt> <tt class="py-line"> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-112" class="py-name" targets="Method paramiko.Message.add_bytes()=paramiko.Message-class.html#add_bytes"><a title="paramiko.Message.add_bytes" class="py-name" href="#" onclick="return doclink('link-112', 'add_bytes', 'link-112');">add_bytes</a></tt><tt class="py-op">(</tt><tt class="py-name">sum_out</tt><tt class="py-op">)</tt> </tt> +<a name="L296"></a><tt class="py-lineno">296</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_packet</tt><tt class="py-op">(</tt><tt id="link-113" class="py-name" targets="Variable paramiko.sftp.CMD_EXTENDED_REPLY=paramiko.sftp-module.html#CMD_EXTENDED_REPLY,Variable paramiko.sftp_attr.CMD_EXTENDED_REPLY=paramiko.sftp_attr-module.html#CMD_EXTENDED_REPLY,Variable paramiko.sftp_client.CMD_EXTENDED_REPLY=paramiko.sftp_client-module.html#CMD_EXTENDED_REPLY,Variable paramiko.sftp_file.CMD_EXTENDED_REPLY=paramiko.sftp_file-module.html#CMD_EXTENDED_REPLY,Variable paramiko.sftp_handle.CMD_EXTENDED_REPLY=paramiko.sftp_handle-module.html#CMD_EXTENDED_REPLY,Variable paramiko.sftp_server.CMD_EXTENDED_REPLY=paramiko.sftp_server-module.html#CMD_EXTENDED_REPLY,Variable paramiko.sftp_si.CMD_EXTENDED_REPLY=paramiko.sftp_si-module.html#CMD_EXTENDED_REPLY"><a title="paramiko.sftp.CMD_EXTENDED_REPLY +paramiko.sftp_attr.CMD_EXTENDED_REPLY +paramiko.sftp_client.CMD_EXTENDED_REPLY +paramiko.sftp_file.CMD_EXTENDED_REPLY +paramiko.sftp_handle.CMD_EXTENDED_REPLY +paramiko.sftp_server.CMD_EXTENDED_REPLY +paramiko.sftp_si.CMD_EXTENDED_REPLY" class="py-name" href="#" onclick="return doclink('link-113', 'CMD_EXTENDED_REPLY', 'link-113');">CMD_EXTENDED_REPLY</a></tt><tt class="py-op">,</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +</div><a name="L297"></a><tt class="py-lineno">297</tt> <tt class="py-line"> </tt> +<a name="SFTPServer._convert_pflags"></a><div id="SFTPServer._convert_pflags-def"><a name="L298"></a><tt class="py-lineno">298</tt> <a class="py-toggle" href="#" id="SFTPServer._convert_pflags-toggle" onclick="return toggle('SFTPServer._convert_pflags');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#_convert_pflags">_convert_pflags</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">pflags</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer._convert_pflags-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer._convert_pflags-expanded"><a name="L299"></a><tt class="py-lineno">299</tt> <tt class="py-line"> <tt class="py-docstring">"convert SFTP-style open() flags to python's os.open() flags"</tt> </tt> +<a name="L300"></a><tt class="py-lineno">300</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">pflags</tt> <tt class="py-op">&</tt> <tt id="link-114" class="py-name" targets="Variable paramiko.sftp.SFTP_FLAG_READ=paramiko.sftp-module.html#SFTP_FLAG_READ,Variable paramiko.sftp_attr.SFTP_FLAG_READ=paramiko.sftp_attr-module.html#SFTP_FLAG_READ,Variable paramiko.sftp_client.SFTP_FLAG_READ=paramiko.sftp_client-module.html#SFTP_FLAG_READ,Variable paramiko.sftp_file.SFTP_FLAG_READ=paramiko.sftp_file-module.html#SFTP_FLAG_READ,Variable paramiko.sftp_handle.SFTP_FLAG_READ=paramiko.sftp_handle-module.html#SFTP_FLAG_READ,Variable paramiko.sftp_server.SFTP_FLAG_READ=paramiko.sftp_server-module.html#SFTP_FLAG_READ,Variable paramiko.sftp_si.SFTP_FLAG_READ=paramiko.sftp_si-module.html#SFTP_FLAG_READ"><a title="paramiko.sftp.SFTP_FLAG_READ +paramiko.sftp_attr.SFTP_FLAG_READ +paramiko.sftp_client.SFTP_FLAG_READ +paramiko.sftp_file.SFTP_FLAG_READ +paramiko.sftp_handle.SFTP_FLAG_READ +paramiko.sftp_server.SFTP_FLAG_READ +paramiko.sftp_si.SFTP_FLAG_READ" class="py-name" href="#" onclick="return doclink('link-114', 'SFTP_FLAG_READ', 'link-114');">SFTP_FLAG_READ</a></tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">pflags</tt> <tt class="py-op">&</tt> <tt id="link-115" class="py-name" targets="Variable paramiko.sftp.SFTP_FLAG_WRITE=paramiko.sftp-module.html#SFTP_FLAG_WRITE,Variable paramiko.sftp_attr.SFTP_FLAG_WRITE=paramiko.sftp_attr-module.html#SFTP_FLAG_WRITE,Variable paramiko.sftp_client.SFTP_FLAG_WRITE=paramiko.sftp_client-module.html#SFTP_FLAG_WRITE,Variable paramiko.sftp_file.SFTP_FLAG_WRITE=paramiko.sftp_file-module.html#SFTP_FLAG_WRITE,Variable paramiko.sftp_handle.SFTP_FLAG_WRITE=paramiko.sftp_handle-module.html#SFTP_FLAG_WRITE,Variable paramiko.sftp_server.SFTP_FLAG_WRITE=paramiko.sftp_server-module.html#SFTP_FLAG_WRITE,Variable paramiko.sftp_si.SFTP_FLAG_WRITE=paramiko.sftp_si-module.html#SFTP_FLAG_WRITE"><a title="paramiko.sftp.SFTP_FLAG_WRITE +paramiko.sftp_attr.SFTP_FLAG_WRITE +paramiko.sftp_client.SFTP_FLAG_WRITE +paramiko.sftp_file.SFTP_FLAG_WRITE +paramiko.sftp_handle.SFTP_FLAG_WRITE +paramiko.sftp_server.SFTP_FLAG_WRITE +paramiko.sftp_si.SFTP_FLAG_WRITE" class="py-name" href="#" onclick="return doclink('link-115', 'SFTP_FLAG_WRITE', 'link-115');">SFTP_FLAG_WRITE</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L301"></a><tt class="py-lineno">301</tt> <tt class="py-line"> <tt class="py-name">flags</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">O_RDWR</tt> </tt> +<a name="L302"></a><tt class="py-lineno">302</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">pflags</tt> <tt class="py-op">&</tt> <tt id="link-116" class="py-name"><a title="paramiko.sftp.SFTP_FLAG_WRITE +paramiko.sftp_attr.SFTP_FLAG_WRITE +paramiko.sftp_client.SFTP_FLAG_WRITE +paramiko.sftp_file.SFTP_FLAG_WRITE +paramiko.sftp_handle.SFTP_FLAG_WRITE +paramiko.sftp_server.SFTP_FLAG_WRITE +paramiko.sftp_si.SFTP_FLAG_WRITE" class="py-name" href="#" onclick="return doclink('link-116', 'SFTP_FLAG_WRITE', 'link-115');">SFTP_FLAG_WRITE</a></tt><tt class="py-op">:</tt> </tt> +<a name="L303"></a><tt class="py-lineno">303</tt> <tt class="py-line"> <tt class="py-name">flags</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">O_WRONLY</tt> </tt> +<a name="L304"></a><tt class="py-lineno">304</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L305"></a><tt class="py-lineno">305</tt> <tt class="py-line"> <tt class="py-name">flags</tt> <tt class="py-op">=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">O_RDONLY</tt> </tt> +<a name="L306"></a><tt class="py-lineno">306</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">pflags</tt> <tt class="py-op">&</tt> <tt id="link-117" class="py-name" targets="Variable paramiko.sftp.SFTP_FLAG_APPEND=paramiko.sftp-module.html#SFTP_FLAG_APPEND,Variable paramiko.sftp_attr.SFTP_FLAG_APPEND=paramiko.sftp_attr-module.html#SFTP_FLAG_APPEND,Variable paramiko.sftp_client.SFTP_FLAG_APPEND=paramiko.sftp_client-module.html#SFTP_FLAG_APPEND,Variable paramiko.sftp_file.SFTP_FLAG_APPEND=paramiko.sftp_file-module.html#SFTP_FLAG_APPEND,Variable paramiko.sftp_handle.SFTP_FLAG_APPEND=paramiko.sftp_handle-module.html#SFTP_FLAG_APPEND,Variable paramiko.sftp_server.SFTP_FLAG_APPEND=paramiko.sftp_server-module.html#SFTP_FLAG_APPEND,Variable paramiko.sftp_si.SFTP_FLAG_APPEND=paramiko.sftp_si-module.html#SFTP_FLAG_APPEND"><a title="paramiko.sftp.SFTP_FLAG_APPEND +paramiko.sftp_attr.SFTP_FLAG_APPEND +paramiko.sftp_client.SFTP_FLAG_APPEND +paramiko.sftp_file.SFTP_FLAG_APPEND +paramiko.sftp_handle.SFTP_FLAG_APPEND +paramiko.sftp_server.SFTP_FLAG_APPEND +paramiko.sftp_si.SFTP_FLAG_APPEND" class="py-name" href="#" onclick="return doclink('link-117', 'SFTP_FLAG_APPEND', 'link-117');">SFTP_FLAG_APPEND</a></tt><tt class="py-op">:</tt> </tt> +<a name="L307"></a><tt class="py-lineno">307</tt> <tt class="py-line"> <tt class="py-name">flags</tt> <tt class="py-op">|=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">O_APPEND</tt> </tt> +<a name="L308"></a><tt class="py-lineno">308</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">pflags</tt> <tt class="py-op">&</tt> <tt id="link-118" class="py-name" targets="Variable paramiko.sftp.SFTP_FLAG_CREATE=paramiko.sftp-module.html#SFTP_FLAG_CREATE,Variable paramiko.sftp_attr.SFTP_FLAG_CREATE=paramiko.sftp_attr-module.html#SFTP_FLAG_CREATE,Variable paramiko.sftp_client.SFTP_FLAG_CREATE=paramiko.sftp_client-module.html#SFTP_FLAG_CREATE,Variable paramiko.sftp_file.SFTP_FLAG_CREATE=paramiko.sftp_file-module.html#SFTP_FLAG_CREATE,Variable paramiko.sftp_handle.SFTP_FLAG_CREATE=paramiko.sftp_handle-module.html#SFTP_FLAG_CREATE,Variable paramiko.sftp_server.SFTP_FLAG_CREATE=paramiko.sftp_server-module.html#SFTP_FLAG_CREATE,Variable paramiko.sftp_si.SFTP_FLAG_CREATE=paramiko.sftp_si-module.html#SFTP_FLAG_CREATE"><a title="paramiko.sftp.SFTP_FLAG_CREATE +paramiko.sftp_attr.SFTP_FLAG_CREATE +paramiko.sftp_client.SFTP_FLAG_CREATE +paramiko.sftp_file.SFTP_FLAG_CREATE +paramiko.sftp_handle.SFTP_FLAG_CREATE +paramiko.sftp_server.SFTP_FLAG_CREATE +paramiko.sftp_si.SFTP_FLAG_CREATE" class="py-name" href="#" onclick="return doclink('link-118', 'SFTP_FLAG_CREATE', 'link-118');">SFTP_FLAG_CREATE</a></tt><tt class="py-op">:</tt> </tt> +<a name="L309"></a><tt class="py-lineno">309</tt> <tt class="py-line"> <tt class="py-name">flags</tt> <tt class="py-op">|=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">O_CREAT</tt> </tt> +<a name="L310"></a><tt class="py-lineno">310</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">pflags</tt> <tt class="py-op">&</tt> <tt id="link-119" class="py-name" targets="Variable paramiko.sftp.SFTP_FLAG_TRUNC=paramiko.sftp-module.html#SFTP_FLAG_TRUNC,Variable paramiko.sftp_attr.SFTP_FLAG_TRUNC=paramiko.sftp_attr-module.html#SFTP_FLAG_TRUNC,Variable paramiko.sftp_client.SFTP_FLAG_TRUNC=paramiko.sftp_client-module.html#SFTP_FLAG_TRUNC,Variable paramiko.sftp_file.SFTP_FLAG_TRUNC=paramiko.sftp_file-module.html#SFTP_FLAG_TRUNC,Variable paramiko.sftp_handle.SFTP_FLAG_TRUNC=paramiko.sftp_handle-module.html#SFTP_FLAG_TRUNC,Variable paramiko.sftp_server.SFTP_FLAG_TRUNC=paramiko.sftp_server-module.html#SFTP_FLAG_TRUNC,Variable paramiko.sftp_si.SFTP_FLAG_TRUNC=paramiko.sftp_si-module.html#SFTP_FLAG_TRUNC"><a title="paramiko.sftp.SFTP_FLAG_TRUNC +paramiko.sftp_attr.SFTP_FLAG_TRUNC +paramiko.sftp_client.SFTP_FLAG_TRUNC +paramiko.sftp_file.SFTP_FLAG_TRUNC +paramiko.sftp_handle.SFTP_FLAG_TRUNC +paramiko.sftp_server.SFTP_FLAG_TRUNC +paramiko.sftp_si.SFTP_FLAG_TRUNC" class="py-name" href="#" onclick="return doclink('link-119', 'SFTP_FLAG_TRUNC', 'link-119');">SFTP_FLAG_TRUNC</a></tt><tt class="py-op">:</tt> </tt> +<a name="L311"></a><tt class="py-lineno">311</tt> <tt class="py-line"> <tt class="py-name">flags</tt> <tt class="py-op">|=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">O_TRUNC</tt> </tt> +<a name="L312"></a><tt class="py-lineno">312</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">pflags</tt> <tt class="py-op">&</tt> <tt id="link-120" class="py-name" targets="Variable paramiko.sftp.SFTP_FLAG_EXCL=paramiko.sftp-module.html#SFTP_FLAG_EXCL,Variable paramiko.sftp_attr.SFTP_FLAG_EXCL=paramiko.sftp_attr-module.html#SFTP_FLAG_EXCL,Variable paramiko.sftp_client.SFTP_FLAG_EXCL=paramiko.sftp_client-module.html#SFTP_FLAG_EXCL,Variable paramiko.sftp_file.SFTP_FLAG_EXCL=paramiko.sftp_file-module.html#SFTP_FLAG_EXCL,Variable paramiko.sftp_handle.SFTP_FLAG_EXCL=paramiko.sftp_handle-module.html#SFTP_FLAG_EXCL,Variable paramiko.sftp_server.SFTP_FLAG_EXCL=paramiko.sftp_server-module.html#SFTP_FLAG_EXCL,Variable paramiko.sftp_si.SFTP_FLAG_EXCL=paramiko.sftp_si-module.html#SFTP_FLAG_EXCL"><a title="paramiko.sftp.SFTP_FLAG_EXCL +paramiko.sftp_attr.SFTP_FLAG_EXCL +paramiko.sftp_client.SFTP_FLAG_EXCL +paramiko.sftp_file.SFTP_FLAG_EXCL +paramiko.sftp_handle.SFTP_FLAG_EXCL +paramiko.sftp_server.SFTP_FLAG_EXCL +paramiko.sftp_si.SFTP_FLAG_EXCL" class="py-name" href="#" onclick="return doclink('link-120', 'SFTP_FLAG_EXCL', 'link-120');">SFTP_FLAG_EXCL</a></tt><tt class="py-op">:</tt> </tt> +<a name="L313"></a><tt class="py-lineno">313</tt> <tt class="py-line"> <tt class="py-name">flags</tt> <tt class="py-op">|=</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">O_EXCL</tt> </tt> +<a name="L314"></a><tt class="py-lineno">314</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">flags</tt> </tt> +</div><a name="L315"></a><tt class="py-lineno">315</tt> <tt class="py-line"> </tt> +<a name="SFTPServer._process"></a><div id="SFTPServer._process-def"><a name="L316"></a><tt class="py-lineno">316</tt> <a class="py-toggle" href="#" id="SFTPServer._process-toggle" onclick="return toggle('SFTPServer._process');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="paramiko.sftp_server.SFTPServer-class.html#_process">_process</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">t</tt><tt class="py-op">,</tt> <tt class="py-param">request_number</tt><tt class="py-op">,</tt> <tt class="py-param">msg</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="SFTPServer._process-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="SFTPServer._process-expanded"><a name="L317"></a><tt class="py-lineno">317</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_log</tt><tt class="py-op">(</tt><tt id="link-121" class="py-name"><a title="paramiko.auth_handler.DEBUG +paramiko.channel.DEBUG +paramiko.client.DEBUG +paramiko.common.DEBUG +paramiko.dsskey.DEBUG +paramiko.hostkeys.DEBUG +paramiko.kex_gex.DEBUG +paramiko.kex_group1.DEBUG +paramiko.logging22.DEBUG +paramiko.packet.DEBUG +paramiko.pkey.DEBUG +paramiko.rsakey.DEBUG +paramiko.server.DEBUG +paramiko.sftp.DEBUG +paramiko.sftp_attr.DEBUG +paramiko.sftp_client.DEBUG +paramiko.sftp_file.DEBUG +paramiko.sftp_handle.DEBUG +paramiko.sftp_server.DEBUG +paramiko.sftp_si.DEBUG +paramiko.transport.DEBUG +paramiko.util.DEBUG" class="py-name" href="#" onclick="return doclink('link-121', 'DEBUG', 'link-37');">DEBUG</a></tt><tt class="py-op">,</tt> <tt class="py-string">'Request: %s'</tt> <tt class="py-op">%</tt> <tt id="link-122" class="py-name" targets="Variable paramiko.sftp.CMD_NAMES=paramiko.sftp-module.html#CMD_NAMES,Variable paramiko.sftp_attr.CMD_NAMES=paramiko.sftp_attr-module.html#CMD_NAMES,Variable paramiko.sftp_client.CMD_NAMES=paramiko.sftp_client-module.html#CMD_NAMES,Variable paramiko.sftp_file.CMD_NAMES=paramiko.sftp_file-module.html#CMD_NAMES,Variable paramiko.sftp_handle.CMD_NAMES=paramiko.sftp_handle-module.html#CMD_NAMES,Variable paramiko.sftp_server.CMD_NAMES=paramiko.sftp_server-module.html#CMD_NAMES,Variable paramiko.sftp_si.CMD_NAMES=paramiko.sftp_si-module.html#CMD_NAMES"><a title="paramiko.sftp.CMD_NAMES +paramiko.sftp_attr.CMD_NAMES +paramiko.sftp_client.CMD_NAMES +paramiko.sftp_file.CMD_NAMES +paramiko.sftp_handle.CMD_NAMES +paramiko.sftp_server.CMD_NAMES +paramiko.sftp_si.CMD_NAMES" class="py-name" href="#" onclick="return doclink('link-122', 'CMD_NAMES', 'link-122');">CMD_NAMES</a></tt><tt class="py-op">[</tt><tt class="py-name">t</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt> +<a name="L318"></a><tt class="py-lineno">318</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-123" class="py-name" targets="Variable paramiko.sftp.CMD_OPEN=paramiko.sftp-module.html#CMD_OPEN,Variable paramiko.sftp_attr.CMD_OPEN=paramiko.sftp_attr-module.html#CMD_OPEN,Variable paramiko.sftp_client.CMD_OPEN=paramiko.sftp_client-module.html#CMD_OPEN,Variable paramiko.sftp_file.CMD_OPEN=paramiko.sftp_file-module.html#CMD_OPEN,Variable paramiko.sftp_handle.CMD_OPEN=paramiko.sftp_handle-module.html#CMD_OPEN,Variable paramiko.sftp_server.CMD_OPEN=paramiko.sftp_server-module.html#CMD_OPEN,Variable paramiko.sftp_si.CMD_OPEN=paramiko.sftp_si-module.html#CMD_OPEN"><a title="paramiko.sftp.CMD_OPEN +paramiko.sftp_attr.CMD_OPEN +paramiko.sftp_client.CMD_OPEN +paramiko.sftp_file.CMD_OPEN +paramiko.sftp_handle.CMD_OPEN +paramiko.sftp_server.CMD_OPEN +paramiko.sftp_si.CMD_OPEN" class="py-name" href="#" onclick="return doclink('link-123', 'CMD_OPEN', 'link-123');">CMD_OPEN</a></tt><tt class="py-op">:</tt> </tt> +<a name="L319"></a><tt class="py-lineno">319</tt> <tt class="py-line"> <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-124" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-124', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L320"></a><tt class="py-lineno">320</tt> <tt class="py-line"> <tt class="py-name">flags</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_convert_pflags</tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-125" class="py-name"><a title="paramiko.Message.get_int" class="py-name" href="#" onclick="return doclink('link-125', 'get_int', 'link-47');">get_int</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L321"></a><tt class="py-lineno">321</tt> <tt class="py-line"> <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt id="link-126" class="py-name"><a title="paramiko.SFTPAttributes" class="py-name" href="#" onclick="return doclink('link-126', 'SFTPAttributes', 'link-80');">SFTPAttributes</a></tt><tt class="py-op">.</tt><tt class="py-name">_from_msg</tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt> +<a name="L322"></a><tt class="py-lineno">322</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_handle_response</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-127" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-127', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-128" class="py-name"><a title="paramiko.SFTPServerInterface.open" class="py-name" href="#" onclick="return doclink('link-128', 'open', 'link-71');">open</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">flags</tt><tt class="py-op">,</tt> <tt class="py-name">attr</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L323"></a><tt class="py-lineno">323</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-129" class="py-name" targets="Variable paramiko.sftp.CMD_CLOSE=paramiko.sftp-module.html#CMD_CLOSE,Variable paramiko.sftp_attr.CMD_CLOSE=paramiko.sftp_attr-module.html#CMD_CLOSE,Variable paramiko.sftp_client.CMD_CLOSE=paramiko.sftp_client-module.html#CMD_CLOSE,Variable paramiko.sftp_file.CMD_CLOSE=paramiko.sftp_file-module.html#CMD_CLOSE,Variable paramiko.sftp_handle.CMD_CLOSE=paramiko.sftp_handle-module.html#CMD_CLOSE,Variable paramiko.sftp_server.CMD_CLOSE=paramiko.sftp_server-module.html#CMD_CLOSE,Variable paramiko.sftp_si.CMD_CLOSE=paramiko.sftp_si-module.html#CMD_CLOSE"><a title="paramiko.sftp.CMD_CLOSE +paramiko.sftp_attr.CMD_CLOSE +paramiko.sftp_client.CMD_CLOSE +paramiko.sftp_file.CMD_CLOSE +paramiko.sftp_handle.CMD_CLOSE +paramiko.sftp_server.CMD_CLOSE +paramiko.sftp_si.CMD_CLOSE" class="py-name" href="#" onclick="return doclink('link-129', 'CMD_CLOSE', 'link-129');">CMD_CLOSE</a></tt><tt class="py-op">:</tt> </tt> +<a name="L324"></a><tt class="py-lineno">324</tt> <tt class="py-line"> <tt class="py-name">handle</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-130" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-130', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L325"></a><tt class="py-lineno">325</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">handle</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">folder_table</tt><tt class="py-op">:</tt> </tt> +<a name="L326"></a><tt class="py-lineno">326</tt> <tt class="py-line"> <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">folder_table</tt><tt class="py-op">[</tt><tt class="py-name">handle</tt><tt class="py-op">]</tt> </tt> +<a name="L327"></a><tt class="py-lineno">327</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-131" class="py-name" targets="Variable paramiko.sftp.SFTP_OK=paramiko.sftp-module.html#SFTP_OK,Variable paramiko.sftp_attr.SFTP_OK=paramiko.sftp_attr-module.html#SFTP_OK,Variable paramiko.sftp_client.SFTP_OK=paramiko.sftp_client-module.html#SFTP_OK,Variable paramiko.sftp_file.SFTP_OK=paramiko.sftp_file-module.html#SFTP_OK,Variable paramiko.sftp_handle.SFTP_OK=paramiko.sftp_handle-module.html#SFTP_OK,Variable paramiko.sftp_server.SFTP_OK=paramiko.sftp_server-module.html#SFTP_OK,Variable paramiko.sftp_si.SFTP_OK=paramiko.sftp_si-module.html#SFTP_OK"><a title="paramiko.sftp.SFTP_OK +paramiko.sftp_attr.SFTP_OK +paramiko.sftp_client.SFTP_OK +paramiko.sftp_file.SFTP_OK +paramiko.sftp_handle.SFTP_OK +paramiko.sftp_server.SFTP_OK +paramiko.sftp_si.SFTP_OK" class="py-name" href="#" onclick="return doclink('link-131', 'SFTP_OK', 'link-131');">SFTP_OK</a></tt><tt class="py-op">)</tt> </tt> +<a name="L328"></a><tt class="py-lineno">328</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L329"></a><tt class="py-lineno">329</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">handle</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">:</tt> </tt> +<a name="L330"></a><tt class="py-lineno">330</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">[</tt><tt class="py-name">handle</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-132" class="py-name"><a title="paramiko.Agent.close +paramiko.BufferedFile.close +paramiko.Channel.close +paramiko.SFTPClient.close +paramiko.SFTPFile.close +paramiko.SFTPHandle.close +paramiko.SSHClient.close +paramiko.Transport.close +paramiko.buffered_pipe.BufferedPipe.close +paramiko.pipe.PosixPipe.close +paramiko.pipe.WindowsPipe.close +paramiko.win_pageant.PageantConnection.close" class="py-name" href="#" onclick="return doclink('link-132', 'close', 'link-57');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L331"></a><tt class="py-lineno">331</tt> <tt class="py-line"> <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">[</tt><tt class="py-name">handle</tt><tt class="py-op">]</tt> </tt> +<a name="L332"></a><tt class="py-lineno">332</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-133" class="py-name"><a title="paramiko.sftp.SFTP_OK +paramiko.sftp_attr.SFTP_OK +paramiko.sftp_client.SFTP_OK +paramiko.sftp_file.SFTP_OK +paramiko.sftp_handle.SFTP_OK +paramiko.sftp_server.SFTP_OK +paramiko.sftp_si.SFTP_OK" class="py-name" href="#" onclick="return doclink('link-133', 'SFTP_OK', 'link-131');">SFTP_OK</a></tt><tt class="py-op">)</tt> </tt> +<a name="L333"></a><tt class="py-lineno">333</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L334"></a><tt class="py-lineno">334</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-134" class="py-name"><a title="paramiko.sftp.SFTP_BAD_MESSAGE +paramiko.sftp_attr.SFTP_BAD_MESSAGE +paramiko.sftp_client.SFTP_BAD_MESSAGE +paramiko.sftp_file.SFTP_BAD_MESSAGE +paramiko.sftp_handle.SFTP_BAD_MESSAGE +paramiko.sftp_server.SFTP_BAD_MESSAGE +paramiko.sftp_si.SFTP_BAD_MESSAGE" class="py-name" href="#" onclick="return doclink('link-134', 'SFTP_BAD_MESSAGE', 'link-100');">SFTP_BAD_MESSAGE</a></tt><tt class="py-op">,</tt> <tt class="py-string">'Invalid handle'</tt><tt class="py-op">)</tt> </tt> +<a name="L335"></a><tt class="py-lineno">335</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-135" class="py-name" targets="Variable paramiko.sftp.CMD_READ=paramiko.sftp-module.html#CMD_READ,Variable paramiko.sftp_attr.CMD_READ=paramiko.sftp_attr-module.html#CMD_READ,Variable paramiko.sftp_client.CMD_READ=paramiko.sftp_client-module.html#CMD_READ,Variable paramiko.sftp_file.CMD_READ=paramiko.sftp_file-module.html#CMD_READ,Variable paramiko.sftp_handle.CMD_READ=paramiko.sftp_handle-module.html#CMD_READ,Variable paramiko.sftp_server.CMD_READ=paramiko.sftp_server-module.html#CMD_READ,Variable paramiko.sftp_si.CMD_READ=paramiko.sftp_si-module.html#CMD_READ"><a title="paramiko.sftp.CMD_READ +paramiko.sftp_attr.CMD_READ +paramiko.sftp_client.CMD_READ +paramiko.sftp_file.CMD_READ +paramiko.sftp_handle.CMD_READ +paramiko.sftp_server.CMD_READ +paramiko.sftp_si.CMD_READ" class="py-name" href="#" onclick="return doclink('link-135', 'CMD_READ', 'link-135');">CMD_READ</a></tt><tt class="py-op">:</tt> </tt> +<a name="L336"></a><tt class="py-lineno">336</tt> <tt class="py-line"> <tt class="py-name">handle</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-136" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-136', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L337"></a><tt class="py-lineno">337</tt> <tt class="py-line"> <tt class="py-name">offset</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-137" class="py-name"><a title="paramiko.Message.get_int64" class="py-name" href="#" onclick="return doclink('link-137', 'get_int64', 'link-97');">get_int64</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L338"></a><tt class="py-lineno">338</tt> <tt class="py-line"> <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-138" class="py-name"><a title="paramiko.Message.get_int" class="py-name" href="#" onclick="return doclink('link-138', 'get_int', 'link-47');">get_int</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L339"></a><tt class="py-lineno">339</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">handle</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">:</tt> </tt> +<a name="L340"></a><tt class="py-lineno">340</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-139" class="py-name"><a title="paramiko.sftp.SFTP_BAD_MESSAGE +paramiko.sftp_attr.SFTP_BAD_MESSAGE +paramiko.sftp_client.SFTP_BAD_MESSAGE +paramiko.sftp_file.SFTP_BAD_MESSAGE +paramiko.sftp_handle.SFTP_BAD_MESSAGE +paramiko.sftp_server.SFTP_BAD_MESSAGE +paramiko.sftp_si.SFTP_BAD_MESSAGE" class="py-name" href="#" onclick="return doclink('link-139', 'SFTP_BAD_MESSAGE', 'link-100');">SFTP_BAD_MESSAGE</a></tt><tt class="py-op">,</tt> <tt class="py-string">'Invalid handle'</tt><tt class="py-op">)</tt> </tt> +<a name="L341"></a><tt class="py-lineno">341</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L342"></a><tt class="py-lineno">342</tt> <tt class="py-line"> <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">[</tt><tt class="py-name">handle</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-140" class="py-name"><a title="paramiko.BufferedFile.read +paramiko.SFTPHandle.read +paramiko.buffered_pipe.BufferedPipe.read" class="py-name" href="#" onclick="return doclink('link-140', 'read', 'link-107');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">offset</tt><tt class="py-op">,</tt> <tt class="py-name">length</tt><tt class="py-op">)</tt> </tt> +<a name="L343"></a><tt class="py-lineno">343</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-name">str</tt><tt class="py-op">:</tt> </tt> +<a name="L344"></a><tt class="py-lineno">344</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt> +<a name="L345"></a><tt class="py-lineno">345</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-141" class="py-name"><a title="paramiko.sftp.SFTP_EOF +paramiko.sftp_attr.SFTP_EOF +paramiko.sftp_client.SFTP_EOF +paramiko.sftp_file.SFTP_EOF +paramiko.sftp_handle.SFTP_EOF +paramiko.sftp_server.SFTP_EOF +paramiko.sftp_si.SFTP_EOF" class="py-name" href="#" onclick="return doclink('link-141', 'SFTP_EOF', 'link-88');">SFTP_EOF</a></tt><tt class="py-op">)</tt> </tt> +<a name="L346"></a><tt class="py-lineno">346</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L347"></a><tt class="py-lineno">347</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_response</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-142" class="py-name" targets="Variable paramiko.sftp.CMD_DATA=paramiko.sftp-module.html#CMD_DATA,Variable paramiko.sftp_attr.CMD_DATA=paramiko.sftp_attr-module.html#CMD_DATA,Variable paramiko.sftp_client.CMD_DATA=paramiko.sftp_client-module.html#CMD_DATA,Variable paramiko.sftp_file.CMD_DATA=paramiko.sftp_file-module.html#CMD_DATA,Variable paramiko.sftp_handle.CMD_DATA=paramiko.sftp_handle-module.html#CMD_DATA,Variable paramiko.sftp_server.CMD_DATA=paramiko.sftp_server-module.html#CMD_DATA,Variable paramiko.sftp_si.CMD_DATA=paramiko.sftp_si-module.html#CMD_DATA"><a title="paramiko.sftp.CMD_DATA +paramiko.sftp_attr.CMD_DATA +paramiko.sftp_client.CMD_DATA +paramiko.sftp_file.CMD_DATA +paramiko.sftp_handle.CMD_DATA +paramiko.sftp_server.CMD_DATA +paramiko.sftp_si.CMD_DATA" class="py-name" href="#" onclick="return doclink('link-142', 'CMD_DATA', 'link-142');">CMD_DATA</a></tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt> </tt> +<a name="L348"></a><tt class="py-lineno">348</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L349"></a><tt class="py-lineno">349</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt> </tt> +<a name="L350"></a><tt class="py-lineno">350</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-143" class="py-name" targets="Variable paramiko.sftp.CMD_WRITE=paramiko.sftp-module.html#CMD_WRITE,Variable paramiko.sftp_attr.CMD_WRITE=paramiko.sftp_attr-module.html#CMD_WRITE,Variable paramiko.sftp_client.CMD_WRITE=paramiko.sftp_client-module.html#CMD_WRITE,Variable paramiko.sftp_file.CMD_WRITE=paramiko.sftp_file-module.html#CMD_WRITE,Variable paramiko.sftp_handle.CMD_WRITE=paramiko.sftp_handle-module.html#CMD_WRITE,Variable paramiko.sftp_server.CMD_WRITE=paramiko.sftp_server-module.html#CMD_WRITE,Variable paramiko.sftp_si.CMD_WRITE=paramiko.sftp_si-module.html#CMD_WRITE"><a title="paramiko.sftp.CMD_WRITE +paramiko.sftp_attr.CMD_WRITE +paramiko.sftp_client.CMD_WRITE +paramiko.sftp_file.CMD_WRITE +paramiko.sftp_handle.CMD_WRITE +paramiko.sftp_server.CMD_WRITE +paramiko.sftp_si.CMD_WRITE" class="py-name" href="#" onclick="return doclink('link-143', 'CMD_WRITE', 'link-143');">CMD_WRITE</a></tt><tt class="py-op">:</tt> </tt> +<a name="L351"></a><tt class="py-lineno">351</tt> <tt class="py-line"> <tt class="py-name">handle</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-144" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-144', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L352"></a><tt class="py-lineno">352</tt> <tt class="py-line"> <tt class="py-name">offset</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-145" class="py-name"><a title="paramiko.Message.get_int64" class="py-name" href="#" onclick="return doclink('link-145', 'get_int64', 'link-97');">get_int64</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L353"></a><tt class="py-lineno">353</tt> <tt class="py-line"> <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-146" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-146', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L354"></a><tt class="py-lineno">354</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">handle</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">:</tt> </tt> +<a name="L355"></a><tt class="py-lineno">355</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-147" class="py-name"><a title="paramiko.sftp.SFTP_BAD_MESSAGE +paramiko.sftp_attr.SFTP_BAD_MESSAGE +paramiko.sftp_client.SFTP_BAD_MESSAGE +paramiko.sftp_file.SFTP_BAD_MESSAGE +paramiko.sftp_handle.SFTP_BAD_MESSAGE +paramiko.sftp_server.SFTP_BAD_MESSAGE +paramiko.sftp_si.SFTP_BAD_MESSAGE" class="py-name" href="#" onclick="return doclink('link-147', 'SFTP_BAD_MESSAGE', 'link-100');">SFTP_BAD_MESSAGE</a></tt><tt class="py-op">,</tt> <tt class="py-string">'Invalid handle'</tt><tt class="py-op">)</tt> </tt> +<a name="L356"></a><tt class="py-lineno">356</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L357"></a><tt class="py-lineno">357</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">[</tt><tt class="py-name">handle</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-148" class="py-name" targets="Method paramiko.BufferedFile.write()=paramiko.BufferedFile-class.html#write,Method paramiko.SFTPHandle.write()=paramiko.SFTPHandle-class.html#write"><a title="paramiko.BufferedFile.write +paramiko.SFTPHandle.write" class="py-name" href="#" onclick="return doclink('link-148', 'write', 'link-148');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">offset</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L358"></a><tt class="py-lineno">358</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-149" class="py-name" targets="Variable paramiko.sftp.CMD_REMOVE=paramiko.sftp-module.html#CMD_REMOVE,Variable paramiko.sftp_attr.CMD_REMOVE=paramiko.sftp_attr-module.html#CMD_REMOVE,Variable paramiko.sftp_client.CMD_REMOVE=paramiko.sftp_client-module.html#CMD_REMOVE,Variable paramiko.sftp_file.CMD_REMOVE=paramiko.sftp_file-module.html#CMD_REMOVE,Variable paramiko.sftp_handle.CMD_REMOVE=paramiko.sftp_handle-module.html#CMD_REMOVE,Variable paramiko.sftp_server.CMD_REMOVE=paramiko.sftp_server-module.html#CMD_REMOVE,Variable paramiko.sftp_si.CMD_REMOVE=paramiko.sftp_si-module.html#CMD_REMOVE"><a title="paramiko.sftp.CMD_REMOVE +paramiko.sftp_attr.CMD_REMOVE +paramiko.sftp_client.CMD_REMOVE +paramiko.sftp_file.CMD_REMOVE +paramiko.sftp_handle.CMD_REMOVE +paramiko.sftp_server.CMD_REMOVE +paramiko.sftp_si.CMD_REMOVE" class="py-name" href="#" onclick="return doclink('link-149', 'CMD_REMOVE', 'link-149');">CMD_REMOVE</a></tt><tt class="py-op">:</tt> </tt> +<a name="L359"></a><tt class="py-lineno">359</tt> <tt class="py-line"> <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-150" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-150', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L360"></a><tt class="py-lineno">360</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-151" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-151', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-152" class="py-name" targets="Method paramiko.SFTPServerInterface.remove()=paramiko.SFTPServerInterface-class.html#remove"><a title="paramiko.SFTPServerInterface.remove" class="py-name" href="#" onclick="return doclink('link-152', 'remove', 'link-152');">remove</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L361"></a><tt class="py-lineno">361</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-153" class="py-name" targets="Variable paramiko.sftp.CMD_RENAME=paramiko.sftp-module.html#CMD_RENAME,Variable paramiko.sftp_attr.CMD_RENAME=paramiko.sftp_attr-module.html#CMD_RENAME,Variable paramiko.sftp_client.CMD_RENAME=paramiko.sftp_client-module.html#CMD_RENAME,Variable paramiko.sftp_file.CMD_RENAME=paramiko.sftp_file-module.html#CMD_RENAME,Variable paramiko.sftp_handle.CMD_RENAME=paramiko.sftp_handle-module.html#CMD_RENAME,Variable paramiko.sftp_server.CMD_RENAME=paramiko.sftp_server-module.html#CMD_RENAME,Variable paramiko.sftp_si.CMD_RENAME=paramiko.sftp_si-module.html#CMD_RENAME"><a title="paramiko.sftp.CMD_RENAME +paramiko.sftp_attr.CMD_RENAME +paramiko.sftp_client.CMD_RENAME +paramiko.sftp_file.CMD_RENAME +paramiko.sftp_handle.CMD_RENAME +paramiko.sftp_server.CMD_RENAME +paramiko.sftp_si.CMD_RENAME" class="py-name" href="#" onclick="return doclink('link-153', 'CMD_RENAME', 'link-153');">CMD_RENAME</a></tt><tt class="py-op">:</tt> </tt> +<a name="L362"></a><tt class="py-lineno">362</tt> <tt class="py-line"> <tt class="py-name">oldpath</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-154" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-154', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L363"></a><tt class="py-lineno">363</tt> <tt class="py-line"> <tt class="py-name">newpath</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-155" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-155', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L364"></a><tt class="py-lineno">364</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-156" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-156', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-157" class="py-name" targets="Method paramiko.SFTPClient.rename()=paramiko.SFTPClient-class.html#rename,Method paramiko.SFTPServerInterface.rename()=paramiko.SFTPServerInterface-class.html#rename"><a title="paramiko.SFTPClient.rename +paramiko.SFTPServerInterface.rename" class="py-name" href="#" onclick="return doclink('link-157', 'rename', 'link-157');">rename</a></tt><tt class="py-op">(</tt><tt class="py-name">oldpath</tt><tt class="py-op">,</tt> <tt class="py-name">newpath</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L365"></a><tt class="py-lineno">365</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-158" class="py-name" targets="Variable paramiko.sftp.CMD_MKDIR=paramiko.sftp-module.html#CMD_MKDIR,Variable paramiko.sftp_attr.CMD_MKDIR=paramiko.sftp_attr-module.html#CMD_MKDIR,Variable paramiko.sftp_client.CMD_MKDIR=paramiko.sftp_client-module.html#CMD_MKDIR,Variable paramiko.sftp_file.CMD_MKDIR=paramiko.sftp_file-module.html#CMD_MKDIR,Variable paramiko.sftp_handle.CMD_MKDIR=paramiko.sftp_handle-module.html#CMD_MKDIR,Variable paramiko.sftp_server.CMD_MKDIR=paramiko.sftp_server-module.html#CMD_MKDIR,Variable paramiko.sftp_si.CMD_MKDIR=paramiko.sftp_si-module.html#CMD_MKDIR"><a title="paramiko.sftp.CMD_MKDIR +paramiko.sftp_attr.CMD_MKDIR +paramiko.sftp_client.CMD_MKDIR +paramiko.sftp_file.CMD_MKDIR +paramiko.sftp_handle.CMD_MKDIR +paramiko.sftp_server.CMD_MKDIR +paramiko.sftp_si.CMD_MKDIR" class="py-name" href="#" onclick="return doclink('link-158', 'CMD_MKDIR', 'link-158');">CMD_MKDIR</a></tt><tt class="py-op">:</tt> </tt> +<a name="L366"></a><tt class="py-lineno">366</tt> <tt class="py-line"> <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-159" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-159', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L367"></a><tt class="py-lineno">367</tt> <tt class="py-line"> <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt id="link-160" class="py-name"><a title="paramiko.SFTPAttributes" class="py-name" href="#" onclick="return doclink('link-160', 'SFTPAttributes', 'link-80');">SFTPAttributes</a></tt><tt class="py-op">.</tt><tt class="py-name">_from_msg</tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt> +<a name="L368"></a><tt class="py-lineno">368</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-161" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-161', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-162" class="py-name" targets="Method paramiko.SFTPClient.mkdir()=paramiko.SFTPClient-class.html#mkdir,Method paramiko.SFTPServerInterface.mkdir()=paramiko.SFTPServerInterface-class.html#mkdir"><a title="paramiko.SFTPClient.mkdir +paramiko.SFTPServerInterface.mkdir" class="py-name" href="#" onclick="return doclink('link-162', 'mkdir', 'link-162');">mkdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">attr</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L369"></a><tt class="py-lineno">369</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-163" class="py-name" targets="Variable paramiko.sftp.CMD_RMDIR=paramiko.sftp-module.html#CMD_RMDIR,Variable paramiko.sftp_attr.CMD_RMDIR=paramiko.sftp_attr-module.html#CMD_RMDIR,Variable paramiko.sftp_client.CMD_RMDIR=paramiko.sftp_client-module.html#CMD_RMDIR,Variable paramiko.sftp_file.CMD_RMDIR=paramiko.sftp_file-module.html#CMD_RMDIR,Variable paramiko.sftp_handle.CMD_RMDIR=paramiko.sftp_handle-module.html#CMD_RMDIR,Variable paramiko.sftp_server.CMD_RMDIR=paramiko.sftp_server-module.html#CMD_RMDIR,Variable paramiko.sftp_si.CMD_RMDIR=paramiko.sftp_si-module.html#CMD_RMDIR"><a title="paramiko.sftp.CMD_RMDIR +paramiko.sftp_attr.CMD_RMDIR +paramiko.sftp_client.CMD_RMDIR +paramiko.sftp_file.CMD_RMDIR +paramiko.sftp_handle.CMD_RMDIR +paramiko.sftp_server.CMD_RMDIR +paramiko.sftp_si.CMD_RMDIR" class="py-name" href="#" onclick="return doclink('link-163', 'CMD_RMDIR', 'link-163');">CMD_RMDIR</a></tt><tt class="py-op">:</tt> </tt> +<a name="L370"></a><tt class="py-lineno">370</tt> <tt class="py-line"> <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-164" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-164', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L371"></a><tt class="py-lineno">371</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-165" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-165', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-166" class="py-name" targets="Method paramiko.SFTPClient.rmdir()=paramiko.SFTPClient-class.html#rmdir,Method paramiko.SFTPServerInterface.rmdir()=paramiko.SFTPServerInterface-class.html#rmdir"><a title="paramiko.SFTPClient.rmdir +paramiko.SFTPServerInterface.rmdir" class="py-name" href="#" onclick="return doclink('link-166', 'rmdir', 'link-166');">rmdir</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L372"></a><tt class="py-lineno">372</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-167" class="py-name" targets="Variable paramiko.sftp.CMD_OPENDIR=paramiko.sftp-module.html#CMD_OPENDIR,Variable paramiko.sftp_attr.CMD_OPENDIR=paramiko.sftp_attr-module.html#CMD_OPENDIR,Variable paramiko.sftp_client.CMD_OPENDIR=paramiko.sftp_client-module.html#CMD_OPENDIR,Variable paramiko.sftp_file.CMD_OPENDIR=paramiko.sftp_file-module.html#CMD_OPENDIR,Variable paramiko.sftp_handle.CMD_OPENDIR=paramiko.sftp_handle-module.html#CMD_OPENDIR,Variable paramiko.sftp_server.CMD_OPENDIR=paramiko.sftp_server-module.html#CMD_OPENDIR,Variable paramiko.sftp_si.CMD_OPENDIR=paramiko.sftp_si-module.html#CMD_OPENDIR"><a title="paramiko.sftp.CMD_OPENDIR +paramiko.sftp_attr.CMD_OPENDIR +paramiko.sftp_client.CMD_OPENDIR +paramiko.sftp_file.CMD_OPENDIR +paramiko.sftp_handle.CMD_OPENDIR +paramiko.sftp_server.CMD_OPENDIR +paramiko.sftp_si.CMD_OPENDIR" class="py-name" href="#" onclick="return doclink('link-167', 'CMD_OPENDIR', 'link-167');">CMD_OPENDIR</a></tt><tt class="py-op">:</tt> </tt> +<a name="L373"></a><tt class="py-lineno">373</tt> <tt class="py-line"> <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-168" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-168', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L374"></a><tt class="py-lineno">374</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_open_folder</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt> </tt> +<a name="L375"></a><tt class="py-lineno">375</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L376"></a><tt class="py-lineno">376</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-169" class="py-name" targets="Variable paramiko.sftp.CMD_READDIR=paramiko.sftp-module.html#CMD_READDIR,Variable paramiko.sftp_attr.CMD_READDIR=paramiko.sftp_attr-module.html#CMD_READDIR,Variable paramiko.sftp_client.CMD_READDIR=paramiko.sftp_client-module.html#CMD_READDIR,Variable paramiko.sftp_file.CMD_READDIR=paramiko.sftp_file-module.html#CMD_READDIR,Variable paramiko.sftp_handle.CMD_READDIR=paramiko.sftp_handle-module.html#CMD_READDIR,Variable paramiko.sftp_server.CMD_READDIR=paramiko.sftp_server-module.html#CMD_READDIR,Variable paramiko.sftp_si.CMD_READDIR=paramiko.sftp_si-module.html#CMD_READDIR"><a title="paramiko.sftp.CMD_READDIR +paramiko.sftp_attr.CMD_READDIR +paramiko.sftp_client.CMD_READDIR +paramiko.sftp_file.CMD_READDIR +paramiko.sftp_handle.CMD_READDIR +paramiko.sftp_server.CMD_READDIR +paramiko.sftp_si.CMD_READDIR" class="py-name" href="#" onclick="return doclink('link-169', 'CMD_READDIR', 'link-169');">CMD_READDIR</a></tt><tt class="py-op">:</tt> </tt> +<a name="L377"></a><tt class="py-lineno">377</tt> <tt class="py-line"> <tt class="py-name">handle</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-170" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-170', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L378"></a><tt class="py-lineno">378</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">handle</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">folder_table</tt><tt class="py-op">:</tt> </tt> +<a name="L379"></a><tt class="py-lineno">379</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-171" class="py-name"><a title="paramiko.sftp.SFTP_BAD_MESSAGE +paramiko.sftp_attr.SFTP_BAD_MESSAGE +paramiko.sftp_client.SFTP_BAD_MESSAGE +paramiko.sftp_file.SFTP_BAD_MESSAGE +paramiko.sftp_handle.SFTP_BAD_MESSAGE +paramiko.sftp_server.SFTP_BAD_MESSAGE +paramiko.sftp_si.SFTP_BAD_MESSAGE" class="py-name" href="#" onclick="return doclink('link-171', 'SFTP_BAD_MESSAGE', 'link-100');">SFTP_BAD_MESSAGE</a></tt><tt class="py-op">,</tt> <tt class="py-string">'Invalid handle'</tt><tt class="py-op">)</tt> </tt> +<a name="L380"></a><tt class="py-lineno">380</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L381"></a><tt class="py-lineno">381</tt> <tt class="py-line"> <tt class="py-name">folder</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">folder_table</tt><tt class="py-op">[</tt><tt class="py-name">handle</tt><tt class="py-op">]</tt> </tt> +<a name="L382"></a><tt class="py-lineno">382</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_folder</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">folder</tt><tt class="py-op">)</tt> </tt> +<a name="L383"></a><tt class="py-lineno">383</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-172" class="py-name" targets="Variable paramiko.sftp.CMD_STAT=paramiko.sftp-module.html#CMD_STAT,Variable paramiko.sftp_attr.CMD_STAT=paramiko.sftp_attr-module.html#CMD_STAT,Variable paramiko.sftp_client.CMD_STAT=paramiko.sftp_client-module.html#CMD_STAT,Variable paramiko.sftp_file.CMD_STAT=paramiko.sftp_file-module.html#CMD_STAT,Variable paramiko.sftp_handle.CMD_STAT=paramiko.sftp_handle-module.html#CMD_STAT,Variable paramiko.sftp_server.CMD_STAT=paramiko.sftp_server-module.html#CMD_STAT,Variable paramiko.sftp_si.CMD_STAT=paramiko.sftp_si-module.html#CMD_STAT"><a title="paramiko.sftp.CMD_STAT +paramiko.sftp_attr.CMD_STAT +paramiko.sftp_client.CMD_STAT +paramiko.sftp_file.CMD_STAT +paramiko.sftp_handle.CMD_STAT +paramiko.sftp_server.CMD_STAT +paramiko.sftp_si.CMD_STAT" class="py-name" href="#" onclick="return doclink('link-172', 'CMD_STAT', 'link-172');">CMD_STAT</a></tt><tt class="py-op">:</tt> </tt> +<a name="L384"></a><tt class="py-lineno">384</tt> <tt class="py-line"> <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-173" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-173', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L385"></a><tt class="py-lineno">385</tt> <tt class="py-line"> <tt class="py-name">resp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-174" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-174', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-175" class="py-name"><a title="paramiko.SFTPClient.stat +paramiko.SFTPFile.stat +paramiko.SFTPHandle.stat +paramiko.SFTPServerInterface.stat" class="py-name" href="#" onclick="return doclink('link-175', 'stat', 'link-104');">stat</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt> +<a name="L386"></a><tt class="py-lineno">386</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">issubclass</tt><tt class="py-op">(</tt><tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">resp</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-176" class="py-name"><a title="paramiko.SFTPAttributes" class="py-name" href="#" onclick="return doclink('link-176', 'SFTPAttributes', 'link-80');">SFTPAttributes</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L387"></a><tt class="py-lineno">387</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_response</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-177" class="py-name" targets="Variable paramiko.sftp.CMD_ATTRS=paramiko.sftp-module.html#CMD_ATTRS,Variable paramiko.sftp_attr.CMD_ATTRS=paramiko.sftp_attr-module.html#CMD_ATTRS,Variable paramiko.sftp_client.CMD_ATTRS=paramiko.sftp_client-module.html#CMD_ATTRS,Variable paramiko.sftp_file.CMD_ATTRS=paramiko.sftp_file-module.html#CMD_ATTRS,Variable paramiko.sftp_handle.CMD_ATTRS=paramiko.sftp_handle-module.html#CMD_ATTRS,Variable paramiko.sftp_server.CMD_ATTRS=paramiko.sftp_server-module.html#CMD_ATTRS,Variable paramiko.sftp_si.CMD_ATTRS=paramiko.sftp_si-module.html#CMD_ATTRS"><a title="paramiko.sftp.CMD_ATTRS +paramiko.sftp_attr.CMD_ATTRS +paramiko.sftp_client.CMD_ATTRS +paramiko.sftp_file.CMD_ATTRS +paramiko.sftp_handle.CMD_ATTRS +paramiko.sftp_server.CMD_ATTRS +paramiko.sftp_si.CMD_ATTRS" class="py-name" href="#" onclick="return doclink('link-177', 'CMD_ATTRS', 'link-177');">CMD_ATTRS</a></tt><tt class="py-op">,</tt> <tt class="py-name">resp</tt><tt class="py-op">)</tt> </tt> +<a name="L388"></a><tt class="py-lineno">388</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L389"></a><tt class="py-lineno">389</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">resp</tt><tt class="py-op">)</tt> </tt> +<a name="L390"></a><tt class="py-lineno">390</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-178" class="py-name" targets="Variable paramiko.sftp.CMD_LSTAT=paramiko.sftp-module.html#CMD_LSTAT,Variable paramiko.sftp_attr.CMD_LSTAT=paramiko.sftp_attr-module.html#CMD_LSTAT,Variable paramiko.sftp_client.CMD_LSTAT=paramiko.sftp_client-module.html#CMD_LSTAT,Variable paramiko.sftp_file.CMD_LSTAT=paramiko.sftp_file-module.html#CMD_LSTAT,Variable paramiko.sftp_handle.CMD_LSTAT=paramiko.sftp_handle-module.html#CMD_LSTAT,Variable paramiko.sftp_server.CMD_LSTAT=paramiko.sftp_server-module.html#CMD_LSTAT,Variable paramiko.sftp_si.CMD_LSTAT=paramiko.sftp_si-module.html#CMD_LSTAT"><a title="paramiko.sftp.CMD_LSTAT +paramiko.sftp_attr.CMD_LSTAT +paramiko.sftp_client.CMD_LSTAT +paramiko.sftp_file.CMD_LSTAT +paramiko.sftp_handle.CMD_LSTAT +paramiko.sftp_server.CMD_LSTAT +paramiko.sftp_si.CMD_LSTAT" class="py-name" href="#" onclick="return doclink('link-178', 'CMD_LSTAT', 'link-178');">CMD_LSTAT</a></tt><tt class="py-op">:</tt> </tt> +<a name="L391"></a><tt class="py-lineno">391</tt> <tt class="py-line"> <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-179" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-179', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L392"></a><tt class="py-lineno">392</tt> <tt class="py-line"> <tt class="py-name">resp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-180" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-180', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-181" class="py-name" targets="Method paramiko.SFTPClient.lstat()=paramiko.SFTPClient-class.html#lstat,Method paramiko.SFTPServerInterface.lstat()=paramiko.SFTPServerInterface-class.html#lstat"><a title="paramiko.SFTPClient.lstat +paramiko.SFTPServerInterface.lstat" class="py-name" href="#" onclick="return doclink('link-181', 'lstat', 'link-181');">lstat</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt> +<a name="L393"></a><tt class="py-lineno">393</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">issubclass</tt><tt class="py-op">(</tt><tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">resp</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-182" class="py-name"><a title="paramiko.SFTPAttributes" class="py-name" href="#" onclick="return doclink('link-182', 'SFTPAttributes', 'link-80');">SFTPAttributes</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L394"></a><tt class="py-lineno">394</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_response</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-183" class="py-name"><a title="paramiko.sftp.CMD_ATTRS +paramiko.sftp_attr.CMD_ATTRS +paramiko.sftp_client.CMD_ATTRS +paramiko.sftp_file.CMD_ATTRS +paramiko.sftp_handle.CMD_ATTRS +paramiko.sftp_server.CMD_ATTRS +paramiko.sftp_si.CMD_ATTRS" class="py-name" href="#" onclick="return doclink('link-183', 'CMD_ATTRS', 'link-177');">CMD_ATTRS</a></tt><tt class="py-op">,</tt> <tt class="py-name">resp</tt><tt class="py-op">)</tt> </tt> +<a name="L395"></a><tt class="py-lineno">395</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L396"></a><tt class="py-lineno">396</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">resp</tt><tt class="py-op">)</tt> </tt> +<a name="L397"></a><tt class="py-lineno">397</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-184" class="py-name" targets="Variable paramiko.sftp.CMD_FSTAT=paramiko.sftp-module.html#CMD_FSTAT,Variable paramiko.sftp_attr.CMD_FSTAT=paramiko.sftp_attr-module.html#CMD_FSTAT,Variable paramiko.sftp_client.CMD_FSTAT=paramiko.sftp_client-module.html#CMD_FSTAT,Variable paramiko.sftp_file.CMD_FSTAT=paramiko.sftp_file-module.html#CMD_FSTAT,Variable paramiko.sftp_handle.CMD_FSTAT=paramiko.sftp_handle-module.html#CMD_FSTAT,Variable paramiko.sftp_server.CMD_FSTAT=paramiko.sftp_server-module.html#CMD_FSTAT,Variable paramiko.sftp_si.CMD_FSTAT=paramiko.sftp_si-module.html#CMD_FSTAT"><a title="paramiko.sftp.CMD_FSTAT +paramiko.sftp_attr.CMD_FSTAT +paramiko.sftp_client.CMD_FSTAT +paramiko.sftp_file.CMD_FSTAT +paramiko.sftp_handle.CMD_FSTAT +paramiko.sftp_server.CMD_FSTAT +paramiko.sftp_si.CMD_FSTAT" class="py-name" href="#" onclick="return doclink('link-184', 'CMD_FSTAT', 'link-184');">CMD_FSTAT</a></tt><tt class="py-op">:</tt> </tt> +<a name="L398"></a><tt class="py-lineno">398</tt> <tt class="py-line"> <tt class="py-name">handle</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-185" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-185', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L399"></a><tt class="py-lineno">399</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">handle</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">:</tt> </tt> +<a name="L400"></a><tt class="py-lineno">400</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-186" class="py-name"><a title="paramiko.sftp.SFTP_BAD_MESSAGE +paramiko.sftp_attr.SFTP_BAD_MESSAGE +paramiko.sftp_client.SFTP_BAD_MESSAGE +paramiko.sftp_file.SFTP_BAD_MESSAGE +paramiko.sftp_handle.SFTP_BAD_MESSAGE +paramiko.sftp_server.SFTP_BAD_MESSAGE +paramiko.sftp_si.SFTP_BAD_MESSAGE" class="py-name" href="#" onclick="return doclink('link-186', 'SFTP_BAD_MESSAGE', 'link-100');">SFTP_BAD_MESSAGE</a></tt><tt class="py-op">,</tt> <tt class="py-string">'Invalid handle'</tt><tt class="py-op">)</tt> </tt> +<a name="L401"></a><tt class="py-lineno">401</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L402"></a><tt class="py-lineno">402</tt> <tt class="py-line"> <tt class="py-name">resp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">[</tt><tt class="py-name">handle</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-187" class="py-name"><a title="paramiko.SFTPClient.stat +paramiko.SFTPFile.stat +paramiko.SFTPHandle.stat +paramiko.SFTPServerInterface.stat" class="py-name" href="#" onclick="return doclink('link-187', 'stat', 'link-104');">stat</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L403"></a><tt class="py-lineno">403</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">issubclass</tt><tt class="py-op">(</tt><tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">resp</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt id="link-188" class="py-name"><a title="paramiko.SFTPAttributes" class="py-name" href="#" onclick="return doclink('link-188', 'SFTPAttributes', 'link-80');">SFTPAttributes</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L404"></a><tt class="py-lineno">404</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_response</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-189" class="py-name"><a title="paramiko.sftp.CMD_ATTRS +paramiko.sftp_attr.CMD_ATTRS +paramiko.sftp_client.CMD_ATTRS +paramiko.sftp_file.CMD_ATTRS +paramiko.sftp_handle.CMD_ATTRS +paramiko.sftp_server.CMD_ATTRS +paramiko.sftp_si.CMD_ATTRS" class="py-name" href="#" onclick="return doclink('link-189', 'CMD_ATTRS', 'link-177');">CMD_ATTRS</a></tt><tt class="py-op">,</tt> <tt class="py-name">resp</tt><tt class="py-op">)</tt> </tt> +<a name="L405"></a><tt class="py-lineno">405</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L406"></a><tt class="py-lineno">406</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">resp</tt><tt class="py-op">)</tt> </tt> +<a name="L407"></a><tt class="py-lineno">407</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-190" class="py-name" targets="Variable paramiko.sftp.CMD_SETSTAT=paramiko.sftp-module.html#CMD_SETSTAT,Variable paramiko.sftp_attr.CMD_SETSTAT=paramiko.sftp_attr-module.html#CMD_SETSTAT,Variable paramiko.sftp_client.CMD_SETSTAT=paramiko.sftp_client-module.html#CMD_SETSTAT,Variable paramiko.sftp_file.CMD_SETSTAT=paramiko.sftp_file-module.html#CMD_SETSTAT,Variable paramiko.sftp_handle.CMD_SETSTAT=paramiko.sftp_handle-module.html#CMD_SETSTAT,Variable paramiko.sftp_server.CMD_SETSTAT=paramiko.sftp_server-module.html#CMD_SETSTAT,Variable paramiko.sftp_si.CMD_SETSTAT=paramiko.sftp_si-module.html#CMD_SETSTAT"><a title="paramiko.sftp.CMD_SETSTAT +paramiko.sftp_attr.CMD_SETSTAT +paramiko.sftp_client.CMD_SETSTAT +paramiko.sftp_file.CMD_SETSTAT +paramiko.sftp_handle.CMD_SETSTAT +paramiko.sftp_server.CMD_SETSTAT +paramiko.sftp_si.CMD_SETSTAT" class="py-name" href="#" onclick="return doclink('link-190', 'CMD_SETSTAT', 'link-190');">CMD_SETSTAT</a></tt><tt class="py-op">:</tt> </tt> +<a name="L408"></a><tt class="py-lineno">408</tt> <tt class="py-line"> <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-191" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-191', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L409"></a><tt class="py-lineno">409</tt> <tt class="py-line"> <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt id="link-192" class="py-name"><a title="paramiko.SFTPAttributes" class="py-name" href="#" onclick="return doclink('link-192', 'SFTPAttributes', 'link-80');">SFTPAttributes</a></tt><tt class="py-op">.</tt><tt class="py-name">_from_msg</tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt> +<a name="L410"></a><tt class="py-lineno">410</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-193" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-193', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-194" class="py-name" targets="Method paramiko.SFTPHandle.chattr()=paramiko.SFTPHandle-class.html#chattr,Method paramiko.SFTPServerInterface.chattr()=paramiko.SFTPServerInterface-class.html#chattr"><a title="paramiko.SFTPHandle.chattr +paramiko.SFTPServerInterface.chattr" class="py-name" href="#" onclick="return doclink('link-194', 'chattr', 'link-194');">chattr</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">attr</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L411"></a><tt class="py-lineno">411</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-195" class="py-name" targets="Variable paramiko.sftp.CMD_FSETSTAT=paramiko.sftp-module.html#CMD_FSETSTAT,Variable paramiko.sftp_attr.CMD_FSETSTAT=paramiko.sftp_attr-module.html#CMD_FSETSTAT,Variable paramiko.sftp_client.CMD_FSETSTAT=paramiko.sftp_client-module.html#CMD_FSETSTAT,Variable paramiko.sftp_file.CMD_FSETSTAT=paramiko.sftp_file-module.html#CMD_FSETSTAT,Variable paramiko.sftp_handle.CMD_FSETSTAT=paramiko.sftp_handle-module.html#CMD_FSETSTAT,Variable paramiko.sftp_server.CMD_FSETSTAT=paramiko.sftp_server-module.html#CMD_FSETSTAT,Variable paramiko.sftp_si.CMD_FSETSTAT=paramiko.sftp_si-module.html#CMD_FSETSTAT"><a title="paramiko.sftp.CMD_FSETSTAT +paramiko.sftp_attr.CMD_FSETSTAT +paramiko.sftp_client.CMD_FSETSTAT +paramiko.sftp_file.CMD_FSETSTAT +paramiko.sftp_handle.CMD_FSETSTAT +paramiko.sftp_server.CMD_FSETSTAT +paramiko.sftp_si.CMD_FSETSTAT" class="py-name" href="#" onclick="return doclink('link-195', 'CMD_FSETSTAT', 'link-195');">CMD_FSETSTAT</a></tt><tt class="py-op">:</tt> </tt> +<a name="L412"></a><tt class="py-lineno">412</tt> <tt class="py-line"> <tt class="py-name">handle</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-196" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-196', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L413"></a><tt class="py-lineno">413</tt> <tt class="py-line"> <tt class="py-name">attr</tt> <tt class="py-op">=</tt> <tt id="link-197" class="py-name"><a title="paramiko.SFTPAttributes" class="py-name" href="#" onclick="return doclink('link-197', 'SFTPAttributes', 'link-80');">SFTPAttributes</a></tt><tt class="py-op">.</tt><tt class="py-name">_from_msg</tt><tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt> +<a name="L414"></a><tt class="py-lineno">414</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">handle</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">:</tt> </tt> +<a name="L415"></a><tt class="py-lineno">415</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_response</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-198" class="py-name"><a title="paramiko.sftp.SFTP_BAD_MESSAGE +paramiko.sftp_attr.SFTP_BAD_MESSAGE +paramiko.sftp_client.SFTP_BAD_MESSAGE +paramiko.sftp_file.SFTP_BAD_MESSAGE +paramiko.sftp_handle.SFTP_BAD_MESSAGE +paramiko.sftp_server.SFTP_BAD_MESSAGE +paramiko.sftp_si.SFTP_BAD_MESSAGE" class="py-name" href="#" onclick="return doclink('link-198', 'SFTP_BAD_MESSAGE', 'link-100');">SFTP_BAD_MESSAGE</a></tt><tt class="py-op">,</tt> <tt class="py-string">'Invalid handle'</tt><tt class="py-op">)</tt> </tt> +<a name="L416"></a><tt class="py-lineno">416</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L417"></a><tt class="py-lineno">417</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">file_table</tt><tt class="py-op">[</tt><tt class="py-name">handle</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-199" class="py-name"><a title="paramiko.SFTPHandle.chattr +paramiko.SFTPServerInterface.chattr" class="py-name" href="#" onclick="return doclink('link-199', 'chattr', 'link-194');">chattr</a></tt><tt class="py-op">(</tt><tt class="py-name">attr</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L418"></a><tt class="py-lineno">418</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-200" class="py-name" targets="Variable paramiko.sftp.CMD_READLINK=paramiko.sftp-module.html#CMD_READLINK,Variable paramiko.sftp_attr.CMD_READLINK=paramiko.sftp_attr-module.html#CMD_READLINK,Variable paramiko.sftp_client.CMD_READLINK=paramiko.sftp_client-module.html#CMD_READLINK,Variable paramiko.sftp_file.CMD_READLINK=paramiko.sftp_file-module.html#CMD_READLINK,Variable paramiko.sftp_handle.CMD_READLINK=paramiko.sftp_handle-module.html#CMD_READLINK,Variable paramiko.sftp_server.CMD_READLINK=paramiko.sftp_server-module.html#CMD_READLINK,Variable paramiko.sftp_si.CMD_READLINK=paramiko.sftp_si-module.html#CMD_READLINK"><a title="paramiko.sftp.CMD_READLINK +paramiko.sftp_attr.CMD_READLINK +paramiko.sftp_client.CMD_READLINK +paramiko.sftp_file.CMD_READLINK +paramiko.sftp_handle.CMD_READLINK +paramiko.sftp_server.CMD_READLINK +paramiko.sftp_si.CMD_READLINK" class="py-name" href="#" onclick="return doclink('link-200', 'CMD_READLINK', 'link-200');">CMD_READLINK</a></tt><tt class="py-op">:</tt> </tt> +<a name="L419"></a><tt class="py-lineno">419</tt> <tt class="py-line"> <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-201" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-201', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L420"></a><tt class="py-lineno">420</tt> <tt class="py-line"> <tt class="py-name">resp</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-202" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-202', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-203" class="py-name" targets="Method paramiko.SFTPClient.readlink()=paramiko.SFTPClient-class.html#readlink,Method paramiko.SFTPServerInterface.readlink()=paramiko.SFTPServerInterface-class.html#readlink"><a title="paramiko.SFTPClient.readlink +paramiko.SFTPServerInterface.readlink" class="py-name" href="#" onclick="return doclink('link-203', 'readlink', 'link-203');">readlink</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt> +<a name="L421"></a><tt class="py-lineno">421</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">resp</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-name">str</tt><tt class="py-op">:</tt> </tt> +<a name="L422"></a><tt class="py-lineno">422</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_response</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-204" class="py-name"><a title="paramiko.sftp.CMD_NAME +paramiko.sftp_attr.CMD_NAME +paramiko.sftp_client.CMD_NAME +paramiko.sftp_file.CMD_NAME +paramiko.sftp_handle.CMD_NAME +paramiko.sftp_server.CMD_NAME +paramiko.sftp_si.CMD_NAME" class="py-name" href="#" onclick="return doclink('link-204', 'CMD_NAME', 'link-94');">CMD_NAME</a></tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">resp</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt id="link-205" class="py-name"><a title="paramiko.SFTPAttributes" class="py-name" href="#" onclick="return doclink('link-205', 'SFTPAttributes', 'link-80');">SFTPAttributes</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L423"></a><tt class="py-lineno">423</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L424"></a><tt class="py-lineno">424</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">resp</tt><tt class="py-op">)</tt> </tt> +<a name="L425"></a><tt class="py-lineno">425</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-206" class="py-name" targets="Variable paramiko.sftp.CMD_SYMLINK=paramiko.sftp-module.html#CMD_SYMLINK,Variable paramiko.sftp_attr.CMD_SYMLINK=paramiko.sftp_attr-module.html#CMD_SYMLINK,Variable paramiko.sftp_client.CMD_SYMLINK=paramiko.sftp_client-module.html#CMD_SYMLINK,Variable paramiko.sftp_file.CMD_SYMLINK=paramiko.sftp_file-module.html#CMD_SYMLINK,Variable paramiko.sftp_handle.CMD_SYMLINK=paramiko.sftp_handle-module.html#CMD_SYMLINK,Variable paramiko.sftp_server.CMD_SYMLINK=paramiko.sftp_server-module.html#CMD_SYMLINK,Variable paramiko.sftp_si.CMD_SYMLINK=paramiko.sftp_si-module.html#CMD_SYMLINK"><a title="paramiko.sftp.CMD_SYMLINK +paramiko.sftp_attr.CMD_SYMLINK +paramiko.sftp_client.CMD_SYMLINK +paramiko.sftp_file.CMD_SYMLINK +paramiko.sftp_handle.CMD_SYMLINK +paramiko.sftp_server.CMD_SYMLINK +paramiko.sftp_si.CMD_SYMLINK" class="py-name" href="#" onclick="return doclink('link-206', 'CMD_SYMLINK', 'link-206');">CMD_SYMLINK</a></tt><tt class="py-op">:</tt> </tt> +<a name="L426"></a><tt class="py-lineno">426</tt> <tt class="py-line"> <tt class="py-comment"># the sftp 2 draft is incorrect here! path always follows target_path</tt> </tt> +<a name="L427"></a><tt class="py-lineno">427</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-name">target_path</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-207" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-207', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L428"></a><tt class="py-lineno">428</tt> <tt class="py-line"> <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-208" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-208', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L429"></a><tt class="py-lineno">429</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-209" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-209', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-210" class="py-name" targets="Method paramiko.SFTPClient.symlink()=paramiko.SFTPClient-class.html#symlink,Method paramiko.SFTPServerInterface.symlink()=paramiko.SFTPServerInterface-class.html#symlink"><a title="paramiko.SFTPClient.symlink +paramiko.SFTPServerInterface.symlink" class="py-name" href="#" onclick="return doclink('link-210', 'symlink', 'link-210');">symlink</a></tt><tt class="py-op">(</tt><tt class="py-name">target_path</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L430"></a><tt class="py-lineno">430</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-211" class="py-name" targets="Variable paramiko.sftp.CMD_REALPATH=paramiko.sftp-module.html#CMD_REALPATH,Variable paramiko.sftp_attr.CMD_REALPATH=paramiko.sftp_attr-module.html#CMD_REALPATH,Variable paramiko.sftp_client.CMD_REALPATH=paramiko.sftp_client-module.html#CMD_REALPATH,Variable paramiko.sftp_file.CMD_REALPATH=paramiko.sftp_file-module.html#CMD_REALPATH,Variable paramiko.sftp_handle.CMD_REALPATH=paramiko.sftp_handle-module.html#CMD_REALPATH,Variable paramiko.sftp_server.CMD_REALPATH=paramiko.sftp_server-module.html#CMD_REALPATH,Variable paramiko.sftp_si.CMD_REALPATH=paramiko.sftp_si-module.html#CMD_REALPATH"><a title="paramiko.sftp.CMD_REALPATH +paramiko.sftp_attr.CMD_REALPATH +paramiko.sftp_client.CMD_REALPATH +paramiko.sftp_file.CMD_REALPATH +paramiko.sftp_handle.CMD_REALPATH +paramiko.sftp_server.CMD_REALPATH +paramiko.sftp_si.CMD_REALPATH" class="py-name" href="#" onclick="return doclink('link-211', 'CMD_REALPATH', 'link-211');">CMD_REALPATH</a></tt><tt class="py-op">:</tt> </tt> +<a name="L431"></a><tt class="py-lineno">431</tt> <tt class="py-line"> <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-212" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-212', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L432"></a><tt class="py-lineno">432</tt> <tt class="py-line"> <tt class="py-name">rpath</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-213" class="py-name"><a title="paramiko.server" class="py-name" href="#" onclick="return doclink('link-213', 'server', 'link-3');">server</a></tt><tt class="py-op">.</tt><tt id="link-214" class="py-name" targets="Method paramiko.SFTPServerInterface.canonicalize()=paramiko.SFTPServerInterface-class.html#canonicalize"><a title="paramiko.SFTPServerInterface.canonicalize" class="py-name" href="#" onclick="return doclink('link-214', 'canonicalize', 'link-214');">canonicalize</a></tt><tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">)</tt> </tt> +<a name="L433"></a><tt class="py-lineno">433</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_response</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-215" class="py-name"><a title="paramiko.sftp.CMD_NAME +paramiko.sftp_attr.CMD_NAME +paramiko.sftp_client.CMD_NAME +paramiko.sftp_file.CMD_NAME +paramiko.sftp_handle.CMD_NAME +paramiko.sftp_server.CMD_NAME +paramiko.sftp_si.CMD_NAME" class="py-name" href="#" onclick="return doclink('link-215', 'CMD_NAME', 'link-94');">CMD_NAME</a></tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">rpath</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt id="link-216" class="py-name"><a title="paramiko.SFTPAttributes" class="py-name" href="#" onclick="return doclink('link-216', 'SFTPAttributes', 'link-80');">SFTPAttributes</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L434"></a><tt class="py-lineno">434</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">t</tt> <tt class="py-op">==</tt> <tt id="link-217" class="py-name" targets="Variable paramiko.sftp.CMD_EXTENDED=paramiko.sftp-module.html#CMD_EXTENDED,Variable paramiko.sftp_attr.CMD_EXTENDED=paramiko.sftp_attr-module.html#CMD_EXTENDED,Variable paramiko.sftp_client.CMD_EXTENDED=paramiko.sftp_client-module.html#CMD_EXTENDED,Variable paramiko.sftp_file.CMD_EXTENDED=paramiko.sftp_file-module.html#CMD_EXTENDED,Variable paramiko.sftp_handle.CMD_EXTENDED=paramiko.sftp_handle-module.html#CMD_EXTENDED,Variable paramiko.sftp_server.CMD_EXTENDED=paramiko.sftp_server-module.html#CMD_EXTENDED,Variable paramiko.sftp_si.CMD_EXTENDED=paramiko.sftp_si-module.html#CMD_EXTENDED"><a title="paramiko.sftp.CMD_EXTENDED +paramiko.sftp_attr.CMD_EXTENDED +paramiko.sftp_client.CMD_EXTENDED +paramiko.sftp_file.CMD_EXTENDED +paramiko.sftp_handle.CMD_EXTENDED +paramiko.sftp_server.CMD_EXTENDED +paramiko.sftp_si.CMD_EXTENDED" class="py-name" href="#" onclick="return doclink('link-217', 'CMD_EXTENDED', 'link-217');">CMD_EXTENDED</a></tt><tt class="py-op">:</tt> </tt> +<a name="L435"></a><tt class="py-lineno">435</tt> <tt class="py-line"> <tt class="py-name">tag</tt> <tt class="py-op">=</tt> <tt class="py-name">msg</tt><tt class="py-op">.</tt><tt id="link-218" class="py-name"><a title="paramiko.Message.get_string" class="py-name" href="#" onclick="return doclink('link-218', 'get_string', 'link-95');">get_string</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L436"></a><tt class="py-lineno">436</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">tag</tt> <tt class="py-op">==</tt> <tt class="py-string">'check-file'</tt><tt class="py-op">:</tt> </tt> +<a name="L437"></a><tt class="py-lineno">437</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_check_file</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt class="py-name">msg</tt><tt class="py-op">)</tt> </tt> +<a name="L438"></a><tt class="py-lineno">438</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L439"></a><tt class="py-lineno">439</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-219" class="py-name" targets="Variable paramiko.sftp.SFTP_OP_UNSUPPORTED=paramiko.sftp-module.html#SFTP_OP_UNSUPPORTED,Variable paramiko.sftp_attr.SFTP_OP_UNSUPPORTED=paramiko.sftp_attr-module.html#SFTP_OP_UNSUPPORTED,Variable paramiko.sftp_client.SFTP_OP_UNSUPPORTED=paramiko.sftp_client-module.html#SFTP_OP_UNSUPPORTED,Variable paramiko.sftp_file.SFTP_OP_UNSUPPORTED=paramiko.sftp_file-module.html#SFTP_OP_UNSUPPORTED,Variable paramiko.sftp_handle.SFTP_OP_UNSUPPORTED=paramiko.sftp_handle-module.html#SFTP_OP_UNSUPPORTED,Variable paramiko.sftp_server.SFTP_OP_UNSUPPORTED=paramiko.sftp_server-module.html#SFTP_OP_UNSUPPORTED,Variable paramiko.sftp_si.SFTP_OP_UNSUPPORTED=paramiko.sftp_si-module.html#SFTP_OP_UNSUPPORTED"><a title="paramiko.sftp.SFTP_OP_UNSUPPORTED +paramiko.sftp_attr.SFTP_OP_UNSUPPORTED +paramiko.sftp_client.SFTP_OP_UNSUPPORTED +paramiko.sftp_file.SFTP_OP_UNSUPPORTED +paramiko.sftp_handle.SFTP_OP_UNSUPPORTED +paramiko.sftp_server.SFTP_OP_UNSUPPORTED +paramiko.sftp_si.SFTP_OP_UNSUPPORTED" class="py-name" href="#" onclick="return doclink('link-219', 'SFTP_OP_UNSUPPORTED', 'link-219');">SFTP_OP_UNSUPPORTED</a></tt><tt class="py-op">)</tt> </tt> +<a name="L440"></a><tt class="py-lineno">440</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L441"></a><tt class="py-lineno">441</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_send_status</tt><tt class="py-op">(</tt><tt class="py-name">request_number</tt><tt class="py-op">,</tt> <tt id="link-220" class="py-name"><a title="paramiko.sftp.SFTP_OP_UNSUPPORTED +paramiko.sftp_attr.SFTP_OP_UNSUPPORTED +paramiko.sftp_client.SFTP_OP_UNSUPPORTED +paramiko.sftp_file.SFTP_OP_UNSUPPORTED +paramiko.sftp_handle.SFTP_OP_UNSUPPORTED +paramiko.sftp_server.SFTP_OP_UNSUPPORTED +paramiko.sftp_si.SFTP_OP_UNSUPPORTED" class="py-name" href="#" onclick="return doclink('link-220', 'SFTP_OP_UNSUPPORTED', 'link-219');">SFTP_OP_UNSUPPORTED</a></tt><tt class="py-op">)</tt> </tt> +</div></div><a name="L442"></a><tt class="py-lineno">442</tt> <tt class="py-line"> </tt> +<a name="L443"></a><tt class="py-lineno">443</tt> <tt class="py-line"> </tt> +<a name="L444"></a><tt class="py-lineno">444</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-221" class="py-name"><a title="paramiko" class="py-name" href="#" onclick="return doclink('link-221', 'paramiko', 'link-0');">paramiko</a></tt><tt class="py-op">.</tt><tt id="link-222" class="py-name" targets="Module paramiko.sftp_handle=paramiko.sftp_handle-module.html"><a title="paramiko.sftp_handle" class="py-name" href="#" onclick="return doclink('link-222', 'sftp_handle', 'link-222');">sftp_handle</a></tt> <tt class="py-keyword">import</tt> <tt id="link-223" class="py-name"><a title="paramiko.SFTPHandle" class="py-name" href="#" onclick="return doclink('link-223', 'SFTPHandle', 'link-81');">SFTPHandle</a></tt> </tt> +<a name="L445"></a><tt class="py-lineno">445</tt> <tt class="py-line"> </tt><script type="text/javascript"> +<!-- +expandto(location.href); +// --> +</script> +</pre> +<br /> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="paramiko-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table border="0" cellpadding="0" cellspacing="0" width="100%%"> + <tr> + <td align="left" class="footer"> + Generated by Epydoc 3.0.1 on Sun Jul 6 18:30:37 2008 + </td> + <td align="right" class="footer"> + <a target="mainFrame" href="http://epydoc.sourceforge.net" + >http://epydoc.sourceforge.net</a> + </td> + </tr> +</table> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> |