96 lines
12 KiB
JSON
96 lines
12 KiB
JSON
{
|
|
"_args": [
|
|
[
|
|
{
|
|
"raw": "ftp@~0.3.10",
|
|
"scope": null,
|
|
"escapedName": "ftp",
|
|
"name": "ftp",
|
|
"rawSpec": "~0.3.10",
|
|
"spec": ">=0.3.10 <0.4.0",
|
|
"type": "range"
|
|
},
|
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/get-uri"
|
|
]
|
|
],
|
|
"_from": "ftp@>=0.3.10 <0.4.0",
|
|
"_id": "ftp@0.3.10",
|
|
"_inCache": true,
|
|
"_location": "/ftp",
|
|
"_npmUser": {
|
|
"name": "mscdex",
|
|
"email": "mscdex@mscdex.net"
|
|
},
|
|
"_npmVersion": "1.4.28",
|
|
"_phantomChildren": {},
|
|
"_requested": {
|
|
"raw": "ftp@~0.3.10",
|
|
"scope": null,
|
|
"escapedName": "ftp",
|
|
"name": "ftp",
|
|
"rawSpec": "~0.3.10",
|
|
"spec": ">=0.3.10 <0.4.0",
|
|
"type": "range"
|
|
},
|
|
"_requiredBy": [
|
|
"/get-uri"
|
|
],
|
|
"_resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz",
|
|
"_shasum": "9197d861ad8142f3e63d5a83bfe4c59f7330885d",
|
|
"_shrinkwrap": null,
|
|
"_spec": "ftp@~0.3.10",
|
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/get-uri",
|
|
"author": {
|
|
"name": "Brian White",
|
|
"email": "mscdex@mscdex.net"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/mscdex/node-ftp/issues"
|
|
},
|
|
"dependencies": {
|
|
"readable-stream": "1.1.x",
|
|
"xregexp": "2.0.0"
|
|
},
|
|
"description": "An FTP client module for node.js",
|
|
"devDependencies": {},
|
|
"directories": {},
|
|
"dist": {
|
|
"shasum": "9197d861ad8142f3e63d5a83bfe4c59f7330885d",
|
|
"tarball": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz"
|
|
},
|
|
"engines": {
|
|
"node": ">=0.8.0"
|
|
},
|
|
"homepage": "https://github.com/mscdex/node-ftp#readme",
|
|
"keywords": [
|
|
"ftp",
|
|
"client",
|
|
"transfer"
|
|
],
|
|
"licenses": [
|
|
{
|
|
"type": "MIT",
|
|
"url": "http://github.com/mscdex/node-ftp/raw/master/LICENSE"
|
|
}
|
|
],
|
|
"main": "./lib/connection",
|
|
"maintainers": [
|
|
{
|
|
"name": "mscdex",
|
|
"email": "mscdex@mscdex.net"
|
|
}
|
|
],
|
|
"name": "ftp",
|
|
"optionalDependencies": {},
|
|
"readme": "Description\n===========\n\nnode-ftp is an FTP client module for [node.js](http://nodejs.org/) that provides an asynchronous interface for communicating with an FTP server.\n\n\nRequirements\n============\n\n* [node.js](http://nodejs.org/) -- v0.8.0 or newer\n\n\nInstall\n=======\n\n npm install ftp\n\n\nExamples\n========\n\n* Get a directory listing of the current (remote) working directory:\n\n```javascript\n var Client = require('ftp');\n\n var c = new Client();\n c.on('ready', function() {\n c.list(function(err, list) {\n if (err) throw err;\n console.dir(list);\n c.end();\n });\n });\n // connect to localhost:21 as anonymous\n c.connect();\n```\n\n* Download remote file 'foo.txt' and save it to the local file system:\n\n```javascript\n var Client = require('ftp');\n var fs = require('fs');\n\n var c = new Client();\n c.on('ready', function() {\n c.get('foo.txt', function(err, stream) {\n if (err) throw err;\n stream.once('close', function() { c.end(); });\n stream.pipe(fs.createWriteStream('foo.local-copy.txt'));\n });\n });\n // connect to localhost:21 as anonymous\n c.connect();\n```\n\n* Upload local file 'foo.txt' to the server:\n\n```javascript\n var Client = require('ftp');\n var fs = require('fs');\n\n var c = new Client();\n c.on('ready', function() {\n c.put('foo.txt', 'foo.remote-copy.txt', function(err) {\n if (err) throw err;\n c.end();\n });\n });\n // connect to localhost:21 as anonymous\n c.connect();\n```\n\n\nAPI\n===\n\nEvents\n------\n\n* **greeting**(< _string_ >msg) - Emitted after connection. `msg` is the text the server sent upon connection.\n\n* **ready**() - Emitted when connection and authentication were sucessful.\n\n* **close**(< _boolean_ >hadErr) - Emitted when the connection has fully closed.\n\n* **end**() - Emitted when the connection has ended.\n\n* **error**(< _Error_ >err) - Emitted when an error occurs. In case of protocol-level errors, `err` contains a 'code' property that references the related 3-digit FTP response code.\n\n\nMethods\n-------\n\n**\\* Note: As with the 'error' event, any error objects passed to callbacks will have a 'code' property for protocol-level errors.**\n\n* **(constructor)**() - Creates and returns a new FTP client instance.\n\n* **connect**(< _object_ >config) - _(void)_ - Connects to an FTP server. Valid config properties:\n\n * host - _string_ - The hostname or IP address of the FTP server. **Default:** 'localhost'\n\n * port - _integer_ - The port of the FTP server. **Default:** 21\n\n * secure - _mixed_ - Set to true for both control and data connection encryption, 'control' for control connection encryption only, or 'implicit' for implicitly encrypted control connection (this mode is deprecated in modern times, but usually uses port 990) **Default:** false\n\n * secureOptions - _object_ - Additional options to be passed to `tls.connect()`. **Default:** (none)\n\n * user - _string_ - Username for authentication. **Default:** 'anonymous'\n\n * password - _string_ - Password for authentication. **Default:** 'anonymous@'\n\n * connTimeout - _integer_ - How long (in milliseconds) to wait for the control connection to be established. **Default:** 10000\n\n * pasvTimeout - _integer_ - How long (in milliseconds) to wait for a PASV data connection to be established. **Default:** 10000\n\n * keepalive - _integer_ - How often (in milliseconds) to send a 'dummy' (NOOP) command to keep the connection alive. **Default:** 10000\n\n* **end**() - _(void)_ - Closes the connection to the server after any/all enqueued commands have been executed.\n\n* **destroy**() - _(void)_ - Closes the connection to the server immediately.\n\n### Required \"standard\" commands (RFC 959)\n\n* **list**([< _string_ >path, ][< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Retrieves the directory listing of `path`. `path` defaults to the current working directory. `useCompression` defaults to false. `callback` has 2 parameters: < _Error_ >err, < _array_ >list. `list` is an array of objects with these properties:\n\n * type - _string_ - A single character denoting the entry type: 'd' for directory, '-' for file (or 'l' for symlink on **\\*NIX only**).\n\n * name - _string_ - The name of the entry.\n\n * size - _string_ - The size of the entry in bytes.\n\n * date - _Date_ - The last modified date of the entry.\n\n * rights - _object_ - The various permissions for this entry **(*NIX only)**.\n\n * user - _string_ - An empty string or any combination of 'r', 'w', 'x'.\n\n * group - _string_ - An empty string or any combination of 'r', 'w', 'x'.\n\n * other - _string_ - An empty string or any combination of 'r', 'w', 'x'.\n \n * owner - _string_ - The user name or ID that this entry belongs to **(*NIX only)**.\n\n * group - _string_ - The group name or ID that this entry belongs to **(*NIX only)**.\n\n * target - _string_ - For symlink entries, this is the symlink's target **(*NIX only)**.\n\n * sticky - _boolean_ - True if the sticky bit is set for this entry **(*NIX only)**.\n\n* **get**(< _string_ >path, [< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Retrieves a file at `path` from the server. `useCompression` defaults to false. `callback` has 2 parameters: < _Error_ >err, < _ReadableStream_ >fileStream.\n\n* **put**(< _mixed_ >input, < _string_ >destPath, [< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Sends data to the server to be stored as `destPath`. `input` can be a ReadableStream, a Buffer, or a path to a local file. `useCompression` defaults to false. `callback` has 1 parameter: < _Error_ >err.\n\n* **append**(< _mixed_ >input, < _string_ >destPath, [< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Same as **put()**, except if `destPath` already exists, it will be appended to instead of overwritten.\n\n* **rename**(< _string_ >oldPath, < _string_ >newPath, < _function_ >callback) - _(void)_ - Renames `oldPath` to `newPath` on the server. `callback` has 1 parameter: < _Error_ >err.\n\n* **logout**(< _function_ >callback) - _(void)_ - Logout the user from the server. `callback` has 1 parameter: < _Error_ >err.\n\n* **delete**(< _string_ >path, < _function_ >callback) - _(void)_ - Deletes a file, `path`, on the server. `callback` has 1 parameter: < _Error_ >err.\n\n* **cwd**(< _string_ >path, < _function_ >callback) - _(void)_ - Changes the current working directory to `path`. `callback` has 2 parameters: < _Error_ >err, < _string_ >currentDir. Note: `currentDir` is only given if the server replies with the path in the response text.\n\n* **abort**(< _function_ >callback) - _(void)_ - Aborts the current data transfer (e.g. from get(), put(), or list()). `callback` has 1 parameter: < _Error_ >err.\n\n* **site**(< _string_ >command, < _function_ >callback) - _(void)_ - Sends `command` (e.g. 'CHMOD 755 foo', 'QUOTA') using SITE. `callback` has 3 parameters: < _Error_ >err, < _string >responseText, < _integer_ >responseCode.\n\n* **status**(< _function_ >callback) - _(void)_ - Retrieves human-readable information about the server's status. `callback` has 2 parameters: < _Error_ >err, < _string_ >status.\n\n* **ascii**(< _function_ >callback) - _(void)_ - Sets the transfer data type to ASCII. `callback` has 1 parameter: < _Error_ >err.\n\n* **binary**(< _function_ >callback) - _(void)_ - Sets the transfer data type to binary (default at time of connection). `callback` has 1 parameter: < _Error_ >err.\n\n### Optional \"standard\" commands (RFC 959)\n\n* **mkdir**(< _string_ >path, [< _boolean_ >recursive, ]< _function_ >callback) - _(void)_ - Creates a new directory, `path`, on the server. `recursive` is for enabling a 'mkdir -p' algorithm and defaults to false. `callback` has 1 parameter: < _Error_ >err.\n\n* **rmdir**(< _string_ >path, [< _boolean_ >recursive, ]< _function_ >callback) - _(void)_ - Removes a directory, `path`, on the server. If `recursive`, this call will delete the contents of the directory if it is not empty. `callback` has 1 parameter: < _Error_ >err.\n\n* **cdup**(< _function_ >callback) - _(void)_ - Changes the working directory to the parent of the current directory. `callback` has 1 parameter: < _Error_ >err.\n\n* **pwd**(< _function_ >callback) - _(void)_ - Retrieves the current working directory. `callback` has 2 parameters: < _Error_ >err, < _string_ >cwd.\n\n* **system**(< _function_ >callback) - _(void)_ - Retrieves the server's operating system. `callback` has 2 parameters: < _Error_ >err, < _string_ >OS.\n\n* **listSafe**([< _string_ >path, ][< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Similar to list(), except the directory is temporarily changed to `path` to retrieve the directory listing. This is useful for servers that do not handle characters like spaces and quotes in directory names well for the LIST command. This function is \"optional\" because it relies on pwd() being available.\n\n### Extended commands (RFC 3659)\n\n* **size**(< _string_ >path, < _function_ >callback) - _(void)_ - Retrieves the size of `path`. `callback` has 2 parameters: < _Error_ >err, < _integer_ >numBytes.\n\n* **lastMod**(< _string_ >path, < _function_ >callback) - _(void)_ - Retrieves the last modified date and time for `path`. `callback` has 2 parameters: < _Error_ >err, < _Date_ >lastModified.\n\n* **restart**(< _integer_ >byteOffset, < _function_ >callback) - _(void)_ - Sets the file byte offset for the next file transfer action (get/put) to `byteOffset`. `callback` has 1 parameter: < _Error_ >err.\n",
|
|
"readmeFilename": "README.md",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+ssh://git@github.com/mscdex/node-ftp.git"
|
|
},
|
|
"scripts": {
|
|
"test": "node test/test.js"
|
|
},
|
|
"version": "0.3.10"
|
|
}
|