ftpd.js
Version:
A FTP Server made in node.js
661 lines (168 loc) • 7.23 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: User</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: User</h1>
<section>
<header>
<h2>
User
</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="User"><span class="type-signature"></span>new User<span class="signature">(theInterface, socket)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>theInterface</code></td>
<td class="type">
<span class="param-type"><a href="Interface.html">Interface</a></span>
</td>
<td class="description last">the interface the user connected through</td>
</tr>
<tr>
<td class="name"><code>socket</code></td>
<td class="type">
<span class="param-type">net.Socket</span>
</td>
<td class="description last">the socket the user is attached to</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line9">line 9</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="getInterface"><span class="type-signature"></span>getInterface<span class="signature">()</span><span class="type-signature"> → {<a href="Interface.html">Interface</a>}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line62">line 62</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the interface the user connected through
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Interface.html">Interface</a></span>
</dd>
</dl>
<h4 class="name" id="getSocket"><span class="type-signature"></span>getSocket<span class="signature">()</span><span class="type-signature"> → {net.Socket}</span></h4>
<div class="description">
This function is used to get the socket the user is attached to
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line73">line 73</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the socket the user is attached to
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">net.Socket</span>
</dd>
</dl>
<h4 class="name" id="getUsername"><span class="type-signature"></span>getUsername<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
This function is used to get the username of the user.
Please note that the username may not have been set when you request it as it's defined when the
user executes the "USER <username>" command
</div>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line24">line 24</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the username of the user if it's been defined
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="setPassword"><span class="type-signature"></span>setPassword<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
This function is used to get the password of the user.
Please note that the password may not have been set when you request it as it's defined when the
user executes the "PASS <username>" command
</div>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="user_index.js.html">user/index.js</a>, <a href="user_index.js.html#line50">line 50</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the password of the user if it's been defined
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ftpdjs.html">ftpdjs</a></li><li><a href="Interface.html">Interface</a></li><li><a href="Server.html">Server</a></li><li><a href="User.html">User</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0-dev</a> on Wed May 27 2015 15:03:13 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>