UNPKG

ftpd.js

Version:
121 lines (95 loc) 2.57 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Source: index.js</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">Source: index.js</h1> <section> <article> <pre class="prettyprint source linenums"><code>//Imports var path = require( "path" ), packageJSON = require( path.join( "..", "..", "package.json" ) ); /** * * @access public * @constructor * @param {object} options * @since 0.6.0 */ function ftpdjs( options ) { this.options = options; } /** * @callback ftpdjs~logCallback * @param {object} error the error if one occoured * @since 0.6.0 */ /** * * This function is used to log messages to the attached stream * * @access public * @param {string} message the message to log * @param {ftpdjs~logCallback} callback the callback to invoke when finished logging or an error occoured. Optional * @since 0.6.0 */ ftpdjs.prototype.log = function ( message, callback ) { if ( typeof(this.getOptions().logger === "function") ) { try { this.getOptions().logger.write( message, "utf8", callback ); } catch ( error ) { if ( typeof(callback === "function") ) { callback( error ); } } } }; /** * * @access public * @returns {object} the package.json for ftpd.js * @since 0.6.0 */ ftpdjs.prototype.getPackage = function () { return packageJSON; }; /** * * @access public * @returns {object} the options object for ftpd.js * @since 0.6.0 */ ftpdjs.prototype.getOptions = function () { return this.options; }; /** * * @access public * @type {ftpdjs} * @since 0.6.0 */ module.exports = ftpdjs;</code></pre> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ftpdjs.html">ftpdjs</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 10:08:08 GMT+0200 (CEST) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>