twisted.conch.interfaces.ISFTPServer.html   [plain text]


<?xml version="1.0" encoding="iso-8859-1"?>
<!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>twisted.conch.interfaces.ISFTPServer</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">

<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="twisted.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://twistedmatrix.com/">Twisted&nbsp;1.3.0rc1</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <font size="-1"><b class="breadcrumbs">
        <a href="twisted.html">Package&nbsp;twisted</a> ::
        <a href="twisted.conch.html">Package&nbsp;conch</a> ::
        <a href="twisted.conch.interfaces.html">Module&nbsp;interfaces</a> ::
        Class&nbsp;ISFTPServer
      </b></font></br>
    </td>
    <td><table cellpadding="0" cellspacing="0">
      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="twisted.conch.interfaces.ISFTPServer.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
    </table></td>
</tr></table>

<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2 class="class">Class ISFTPServer</h2>

<pre class="base-tree">
<a href="twisted.python.components.Interface.html"><code>Interface</code></a> --+
            |
           <b>ISFTPServer</b>
</pre><br />

<hr/>

The only attribute of this class is &quot;avatar&quot;. It is the 
avatar returned by the Realm that we are authenticated with, and 
represents the logged-in user. Each method should check to verify that 
the user has permission for their actions.
<hr/>


<!-- =========== START OF METHOD SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Method Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="twisted.conch.interfaces.ISFTPServer.html#getAttrs" class="summary-sig-name"><code>getAttrs</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>path</span>,
          <span class=summary-sig-arg>followLinks</span>)</span></code>
<br />
Return the attributes for the given path.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="twisted.conch.interfaces.ISFTPServer.html#gotVersion" class="summary-sig-name"><code>gotVersion</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>otherVersion</span>,
          <span class=summary-sig-arg>extData</span>)</span></code>
<br />
Called when the client sends their version info.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="twisted.conch.interfaces.ISFTPServer.html#makeDirectory" class="summary-sig-name"><code>makeDirectory</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>path</span>,
          <span class=summary-sig-arg>attrs</span>)</span></code>
<br />
Make a directory.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="twisted.conch.interfaces.ISFTPServer.html#makeLink" class="summary-sig-name"><code>makeLink</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>linkPath</span>,
          <span class=summary-sig-arg>targetPath</span>)</span></code>
<br />
Create a symbolic link.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="twisted.conch.interfaces.ISFTPServer.html#openDirectory" class="summary-sig-name"><code>openDirectory</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>path</span>)</span></code>
<br />
Open a directory for scanning.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="twisted.conch.interfaces.ISFTPServer.html#openFile" class="summary-sig-name"><code>openFile</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>filename</span>,
          <span class=summary-sig-arg>flags</span>,
          <span class=summary-sig-arg>attrs</span>)</span></code>
<br />
Called when the clients asks to open a file.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="twisted.conch.interfaces.ISFTPServer.html#readLink" class="summary-sig-name"><code>readLink</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>path</span>)</span></code>
<br />
Find the root of a set of symbolic links.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="twisted.conch.interfaces.ISFTPServer.html#realPath" class="summary-sig-name"><code>realPath</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>path</span>)</span></code>
<br />
Convert any path to an absolute path.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="twisted.conch.interfaces.ISFTPServer.html#removeDirectory" class="summary-sig-name"><code>removeDirectory</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>path</span>)</span></code>
<br />
Remove a directory (non-recursively)</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="twisted.conch.interfaces.ISFTPServer.html#removeFile" class="summary-sig-name"><code>removeFile</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>filename</span>)</span></code>
<br />
Remove the given file.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="twisted.conch.interfaces.ISFTPServer.html#renameFile" class="summary-sig-name"><code>renameFile</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>oldpath</span>,
          <span class=summary-sig-arg>newpath</span>)</span></code>
<br />
Rename the given file.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="twisted.conch.interfaces.ISFTPServer.html#setAttrs" class="summary-sig-name"><code>setAttrs</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>path</span>,
          <span class=summary-sig-arg>attrs</span>)</span></code>
<br />
Set the attributes for the path.</td></tr>
</table><br />


<!-- =========== START OF METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Method Details</th></tr>
</table>

<a name="getAttrs"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">getAttrs</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>path</span>,
          <span class=sig-arg>followLinks</span>)</span>
  </h3>
  <p>Return the attributes for the given path.</p>
  <p>path is the path to return attributes for as a string. followLinks 
  is a boolean. if it is True, follow symbolic links and return 
  attributes for the real path at the base. if it is False, return 
  attributes for the specified path.</p>
  This method returns a dictionary in the same format as the attrs 
  argument to openFile or a Deferred that is called back with same.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="gotVersion"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">gotVersion</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>otherVersion</span>,
          <span class=sig-arg>extData</span>)</span>
  </h3>
  <p>Called when the client sends their version info.</p>
  <p>otherVersion is an integer representing the version of the SFTP 
  protocol they are claiming. extData is a dictionary of extended_name : 
  extended_data items. These items are sent by the client to indicate 
  additional features.</p>
  This method should return a dictionary of extended_name : 
  extended_data items. These items are the additional features (if any) 
  supported by the server.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="makeDirectory"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">makeDirectory</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>path</span>,
          <span class=sig-arg>attrs</span>)</span>
  </h3>
  <p>Make a directory.</p>
  <p>path is the name of the directory to create as a string. attrs is a 
  dictionary of attributes to create the directory with. It's meaning is 
  the same as the attrs in the openFile method.</p>
  This method returns when the directory is created, or a Deferred 
  that is called back when it is created.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="makeLink"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">makeLink</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>linkPath</span>,
          <span class=sig-arg>targetPath</span>)</span>
  </h3>
  <p>Create a symbolic link.</p>
  <p>linkPath is is the pathname of the symlink as a string targetPath is 
  the path of the target of the link as a string.</p>
  This method returns when the link is made, or a Deferred that 
  returns the same.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="openDirectory"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">openDirectory</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>path</span>)</span>
  </h3>
  <p>Open a directory for scanning.</p>
  <p>path is the directory to open.</p>
  <p>This method returns an iterable object that has a close() method, or 
  a Deferred that is called back with same.</p>
  <p>The close() method is called when the client is finished reading 
  from the directory. At this point, the iterable will no longer be 
  used.</p>
  <p>The iterable should return triples of the form (filename, longname, 
  attrs) or Deferreds that return the same. The sequence must support 
  __getitem__, but otherwise may be any 'sequence-like' object.</p>
  <p>filename is the name of the file relative to the directory. logname 
  is an expanded format of the filename. The recommended format is: 
  -rwxr-xr-x 1 mjos staff 348911 Mar 25 14:29 t-filexfer 1234567890 123 
  12345678 12345678 12345678 123456789012</p>
  <p>The first line is sample output, the second is the length of the 
  field. The fields are: permissions, link count, user owner, group 
  owner, size in bytes, modification time.</p>
  attrs is a dictionary in the format of the attrs argument to 
  openFile.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="openFile"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">openFile</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>filename</span>,
          <span class=sig-arg>flags</span>,
          <span class=sig-arg>attrs</span>)</span>
  </h3>
<pre class="literalblock">
Called when the clients asks to open a file.

filename is a string representing the file to open.

flags is a integer of the flags to open the file with, ORed together.
The flags and their values are listed at the bottom of this file.

attrs is a list of attributes to open the file with.  It is a
dictionary, consisting of 0 or more keys.  The possible keys are:
    size: the size of the file in bytes
    uid: the user ID of the file as an integer
    gid: the group ID of the file as an integer
    permissions: the permissions of the file with as an integer.
    the bit representation of this field is defined by POSIX.
    atime: the access time of the file as seconds since the epoch.
    mtime: the modification time of the file as seconds since the epoch.
    ext_*: extended attributes.  The server is not required to
    understand this, but it may.

NOTE: there is no way to indicate text or binary files.  it is up
to the SFTP client to deal with this.

This method returns an object that meets the ISFTPFile interface.
Alternatively, it can return a Deferred that will be called back
with the object.
</pre>
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="readLink"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">readLink</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>path</span>)</span>
  </h3>
  <p>Find the root of a set of symbolic links.</p>
  <p>path is the path of the symlink to read.</p>
  This method returns the target of the link, or a Deferred that 
  returns the same.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="realPath"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">realPath</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>path</span>)</span>
  </h3>
  <p>Convert any path to an absolute path.</p>
  <p>path is the path to convert as a string.</p>
  This method returns the absolute path as a string, or a Deferred 
  that returns the same.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="removeDirectory"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">removeDirectory</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>path</span>)</span>
  </h3>
  <p>Remove a directory (non-recursively)</p>
  <p>path is the directory to remove.</p>
  <p>It is an error to remove a directory that has files or directories 
  in it.</p>
  This method returns when the directory is removed, or a Deferred 
  that is called back when it is removed.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="removeFile"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">removeFile</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>filename</span>)</span>
  </h3>
  <p>Remove the given file.</p>
  <p>filename is the name of the file as a string.</p>
  This method returns when the remove succeeds, or a Deferred that is 
  called back when it succeeds.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="renameFile"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">renameFile</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>oldpath</span>,
          <span class=sig-arg>newpath</span>)</span>
  </h3>
  <p>Rename the given file.</p>
  <p>oldpath is the current location of the file. newpath is the new file 
  name.</p>
  This method returns when the rename succeeds, or a Deferred that is 
  called back when it succeeds.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="setAttrs"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">setAttrs</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>path</span>,
          <span class=sig-arg>attrs</span>)</span>
  </h3>
  <p>Set the attributes for the path.</p>
  <p>path is the path to set attributes for as a string. attrs is a 
  idctionary in the same format as the attrs argument to openFile.</p>
  This method returns when the attributes are set or a Deferred that 
  is called back when they are.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>
<br />


<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="twisted.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://twistedmatrix.com/">Twisted&nbsp;1.3.0rc1</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td align="left"><font size="-2">Generated by Epydoc 2.0 on Sat May 15 20:08:02 2004</font></td>
    <td align="right"><a href="http://epydoc.sourceforge.net"
                      ><font size="-2">http://epydoc.sf.net</font></a></td>
  </tr>
</table>
</body>
</html>