{"_id":"upyun-legacy","_rev":"37-4ad1fa566a745e9a1e9f60c40e0f6461","name":"upyun-legacy","description":"upyun sdk for node.js","dist-tags":{"latest":"0.4.5"},"versions":{"0.1.2":{"name":"upyun-legacy","version":"0.1.2","description":"official upyun sdk for node.js","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@github.com:lisposter/node-upyun-legacy.git"},"keywords":["upyun","sdk","cdn","cloudstorage"],"author":{"name":"Leigh Zhu"},"license":"MIT","bugs":{"url":"https://github.com/lisposter/node-upyun-legacy/issues"},"homepage":"https://github.com/lisposter/node-upyun-legacy","devDependencies":{"istanbul":"^0.3.2","mocha":"~1.16.2","should":"~4.0.4"},"_id":"upyun-legacy@0.1.2","_shasum":"478da32f820450e2be3e57e899ba99839abe9afe","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"lisposter","email":"i@zhuli.me"},"maintainers":[{"name":"lisposter","email":"i@zhuli.me"}],"dist":{"shasum":"478da32f820450e2be3e57e899ba99839abe9afe","tarball":"https://registry.npmjs.org/upyun-legacy/-/upyun-legacy-0.1.2.tgz","integrity":"sha512-FZz1EJ/XNevXYkTv1/xb9gJ6Jahg3sTNUBOzZwHmQMTVTKu9K4c7JkQqCf7cXrvZOECV8G7hK+4/aF0y48rTvQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6KCcL9hrhHglt/c3Igu4w4GjcwvRr39GG/9YKbYo+xgIgbc596O/8fNcGjAHOusl16sNjhxgMh7uODgoE09wtn1s="}]}},"0.1.3":{"name":"upyun-legacy","version":"0.1.3","description":"official upyun sdk for node.js","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@github.com:lisposter/node-upyun-legacy.git"},"keywords":["upyun","sdk","cdn","cloudstorage"],"author":{"name":"Leigh Zhu"},"license":"MIT","bugs":{"url":"https://github.com/lisposter/node-upyun-legacy/issues"},"homepage":"https://github.com/lisposter/node-upyun-legacy","devDependencies":{"istanbul":"^0.3.2","mocha":"~1.16.2","should":"~4.0.4"},"_id":"upyun-legacy@0.1.3","_shasum":"aa15d903069475b8022bacb0faafb1a5138faf04","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"lisposter","email":"i@zhuli.me"},"maintainers":[{"name":"lisposter","email":"i@zhuli.me"}],"dist":{"shasum":"aa15d903069475b8022bacb0faafb1a5138faf04","tarball":"https://registry.npmjs.org/upyun-legacy/-/upyun-legacy-0.1.3.tgz","integrity":"sha512-b5ai1cb29a3IyZ+EH8s/0pFsgAMkBeWApoHNdfwAkWtQnmBSs+VgtO8PEC1885m6ONvgkeG4AIAmp8/oHDvBsw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYN/dxZfSfO6raRM3ysOPu9x/kVHooMLTvd/tELB55JAIhAIBtcyKW3X+Sq29KtE1Sz/1rX/Ma28nwl6izlKcemzYa"}]}},"0.1.4":{"name":"upyun-legacy","version":"0.1.4","description":"official upyun sdk for node.js","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@github.com:lisposter/node-upyun-legacy.git"},"keywords":["upyun","sdk","cdn","cloudstorage"],"author":{"name":"Leigh Zhu"},"license":"MIT","bugs":{"url":"https://github.com/lisposter/node-upyun-legacy/issues"},"homepage":"https://github.com/lisposter/node-upyun-legacy","devDependencies":{"istanbul":"^0.3.2","mocha":"~1.16.2","should":"~4.0.4"},"_id":"upyun-legacy@0.1.4","_shasum":"120728d1ad2155ccd224bf63a42122ad832fb4a3","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"lisposter","email":"i@zhuli.me"},"maintainers":[{"name":"lisposter","email":"i@zhuli.me"}],"dist":{"shasum":"120728d1ad2155ccd224bf63a42122ad832fb4a3","tarball":"https://registry.npmjs.org/upyun-legacy/-/upyun-legacy-0.1.4.tgz","integrity":"sha512-1JaVIogTpLQA34FktxJlH/f2ScP8DyXA3jQIbEgb1GeEiQteDe81ZiFlEpyDg3b0UG5wB24JjNsucwbGe4leQA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAgoH69mb1mscBckcBg1ESb6qxVA7tb1y2POgi9YOVVeAiEAhcpJsTunzmLJCnM0UhID6H4Ysscpt1xf3elwMj5i9GM="}]}},"0.1.5":{"name":"upyun-legacy","version":"0.1.5","description":"official upyun sdk for node.js","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@github.com:lisposter/node-upyun-legacy.git"},"keywords":["upyun","sdk","cdn","cloudstorage"],"author":{"name":"Leigh Zhu"},"license":"MIT","bugs":{"url":"https://github.com/lisposter/node-upyun-legacy/issues"},"homepage":"https://github.com/lisposter/node-upyun-legacy","devDependencies":{"istanbul":"^0.3.2","mocha":"~1.16.2","should":"~4.0.4"},"_id":"upyun-legacy@0.1.5","_shasum":"1a00da1906e4f26a6b2a12b67f827cafa262c848","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"lisposter","email":"i@zhuli.me"},"maintainers":[{"name":"lisposter","email":"i@zhuli.me"}],"dist":{"shasum":"1a00da1906e4f26a6b2a12b67f827cafa262c848","tarball":"https://registry.npmjs.org/upyun-legacy/-/upyun-legacy-0.1.5.tgz","integrity":"sha512-Zgje8FD3HDl8QGHi4aEAimiZL/ypnAMpXIHgIir8/+svQMu0R43QTuECWGjUfidENJ7DduMRhVjQm1/nk4Bgzg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEzkn2a1A00pjSnGW/1TYxOzZ9C3O9nvG+NTvolJ7GDLAiEAo9Veg+dScq3dV2Q6Fq/9OHEySzmCIq3mu5dgitOVdSw="}]}},"0.2.0":{"name":"upyun-legacy","version":"0.2.0","description":"official upyun sdk for node.js","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@github.com:lisposter/node-upyun-legacy.git"},"keywords":["upyun","sdk","cdn","cloudstorage"],"author":{"name":"Leigh Zhu"},"license":"MIT","bugs":{"url":"https://github.com/lisposter/node-upyun-legacy/issues"},"homepage":"https://github.com/lisposter/node-upyun-legacy","devDependencies":{"istanbul":"^0.3.2","mocha":"~1.16.2","should":"~4.0.4"},"_id":"upyun-legacy@0.2.0","_shasum":"7e55021f1086581b0e9fde685cc615504c16fb07","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"lisposter","email":"i@zhuli.me"},"maintainers":[{"name":"lisposter","email":"i@zhuli.me"}],"dist":{"shasum":"7e55021f1086581b0e9fde685cc615504c16fb07","tarball":"https://registry.npmjs.org/upyun-legacy/-/upyun-legacy-0.2.0.tgz","integrity":"sha512-bSuGAmI3Vm1Xc+U6DzqRncbUxlVgMq9fttnNSjHzniYy+OqJZDQW5xP3VDirM8ttQYFfdNL88Tb+zXlpr1WDcQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICoPBH2q5TsVa1Z8eDKY1Hneed32lSEjkX7H2FEmQA0KAiEA8auKU+nSaohWkKd8WXFPQ189qntu19YBW1Xmj6813N8="}]}},"0.2.1":{"name":"upyun-legacy","version":"0.2.1","description":"official upyun sdk for node.js","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@github.com:lisposter/node-upyun-legacy.git"},"keywords":["upyun","sdk","cdn","cloudstorage"],"author":{"name":"Leigh Zhu"},"license":"MIT","bugs":{"url":"https://github.com/lisposter/node-upyun-legacy/issues"},"homepage":"https://github.com/lisposter/node-upyun-legacy","devDependencies":{"istanbul":"^0.3.2","mocha":"~1.16.2","should":"~4.0.4"},"_id":"upyun-legacy@0.2.1","_shasum":"60564fecd69a4a74106db3db6e2c7a295b6eecca","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"lisposter","email":"i@zhuli.me"},"maintainers":[{"name":"lisposter","email":"i@zhuli.me"}],"dist":{"shasum":"60564fecd69a4a74106db3db6e2c7a295b6eecca","tarball":"https://registry.npmjs.org/upyun-legacy/-/upyun-legacy-0.2.1.tgz","integrity":"sha512-s30ON2Jw9ZssQHWbjhLO3ilCvvfI1vic0XX20lkLEvq/rT++9Th6WgVI/kQhMOe2WYH2KLZBfjLXe28iyDxIXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8pVlVTdW0BUnFCo0IsyZ5z4Tv21tORgv2a+p32LaSlwIgE3vGj4QZEiaAP3O99kerS14REay65qNq56a/C5SNQgw="}]}},"0.2.2":{"name":"upyun-legacy","version":"0.2.2","description":"official upyun sdk for node.js","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@github.com:lisposter/node-upyun-legacy.git"},"keywords":["upyun","sdk","cdn","cloudstorage"],"author":{"name":"Leigh Zhu"},"license":"MIT","bugs":{"url":"https://github.com/lisposter/node-upyun-legacy/issues"},"homepage":"https://github.com/lisposter/node-upyun-legacy","devDependencies":{"istanbul":"^0.3.2","mocha":"~1.16.2","should":"~4.0.4"},"_id":"upyun-legacy@0.2.2","_shasum":"6ca87eb165db58d54e2f6cd05ab3f257e3801049","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"lisposter","email":"i@zhuli.me"},"maintainers":[{"name":"lisposter","email":"i@zhuli.me"}],"dist":{"shasum":"6ca87eb165db58d54e2f6cd05ab3f257e3801049","tarball":"https://registry.npmjs.org/upyun-legacy/-/upyun-legacy-0.2.2.tgz","integrity":"sha512-QtmEec2XN8laVkuoIRs+PXPdeHHoL/riKlNRMgCcv0KpD2d74QC3AS1lE1qabqkXOuIqixASk8ZsDRKWhtSliA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGXauK8y3gjwvUVgdEzB7e2Jt+bsVToskoqDB+TId9DLAiEAvVqTlyM0gzNgAndwsJ00hBMwufMtpAIaKzY13knNNjA="}]}},"0.2.3":{"name":"upyun-legacy","version":"0.2.3","description":"official upyun sdk for node.js","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@github.com:lisposter/node-upyun-legacy.git"},"keywords":["upyun","sdk","cdn","cloudstorage"],"author":{"name":"Leigh Zhu"},"license":"MIT","bugs":{"url":"https://github.com/lisposter/node-upyun-legacy/issues"},"homepage":"https://github.com/lisposter/node-upyun-legacy","devDependencies":{"istanbul":"^0.3.2","mocha":"~1.16.2","should":"~4.0.4"},"_id":"upyun-legacy@0.2.3","_shasum":"4a14bbf2c63e97d5cd5734f5ea434a97ca289ad3","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"lisposter","email":"i@zhuli.me"},"maintainers":[{"name":"lisposter","email":"i@zhuli.me"}],"dist":{"shasum":"4a14bbf2c63e97d5cd5734f5ea434a97ca289ad3","tarball":"https://registry.npmjs.org/upyun-legacy/-/upyun-legacy-0.2.3.tgz","integrity":"sha512-bbDv2XzlUFwTDSJ/0wxgrHt844FvKiEXiOaupadm2oO2+jdfLzdMbuVsBL2OeJOC44dXq4qWOBjnFbjNtzpq5Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIADqRcgDcFh1ZUb87PzmtQHF08eYBBMlmkAYiMs2W8hxAiAnR61GLYou1Uk7BI24FIjPTHmliY0ctzUyokU+w4vQqw=="}]}},"0.3.0":{"name":"upyun-legacy","version":"0.3.0","description":"official upyun sdk for node.js","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@github.com:lisposter/node-upyun-legacy.git"},"keywords":["upyun","sdk","cdn","cloudstorage"],"author":{"name":"Leigh Zhu"},"license":"MIT","bugs":{"url":"https://github.com/lisposter/node-upyun-legacy/issues"},"homepage":"https://github.com/lisposter/node-upyun-legacy","devDependencies":{"istanbul":"^0.3.2","mocha":"~1.16.2","should":"~4.0.4"},"_id":"upyun-legacy@0.3.0","_shasum":"cb6ffe9886ded38c2ef6df8b2598ec5c23e08cc0","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"lisposter","email":"i@zhuli.me"},"maintainers":[{"name":"lisposter","email":"i@zhuli.me"}],"dist":{"shasum":"cb6ffe9886ded38c2ef6df8b2598ec5c23e08cc0","tarball":"https://registry.npmjs.org/upyun-legacy/-/upyun-legacy-0.3.0.tgz","integrity":"sha512-dl1WtmlUmYUsWf5lv5XttmL4Citb37f8/Nyj3B6Ioz6GZFtER6oDUUzTlus9K2rt3Vvw6qzRDhd9cgXKvaCA5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXER1SjEmfQjM99DdqVRTa5XmjVNHIIL5zRsnUTv5GbQIge3i1xzzlUpvExnJMmtPp09yoUunO8ye5jnS+OFXuraM="}]}},"0.4.0":{"name":"upyun-legacy","version":"0.4.0","description":"official upyun sdk for node.js","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@github.com:lisposter/node-upyun-legacy.git"},"keywords":["upyun","sdk","cdn","cloudstorage"],"author":{"name":"Leigh Zhu"},"license":"MIT","bugs":{"url":"https://github.com/lisposter/node-upyun-legacy/issues"},"homepage":"https://github.com/lisposter/node-upyun-legacy","devDependencies":{"istanbul":"^0.3.2","mocha":"~1.16.2","should":"~4.0.4"},"_id":"upyun-legacy@0.4.0","_shasum":"1b7a428677023edfcbbe8e09df3728541cf0637e","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"lisposter","email":"i@zhuli.me"},"maintainers":[{"name":"lisposter","email":"i@zhuli.me"}],"dist":{"shasum":"1b7a428677023edfcbbe8e09df3728541cf0637e","tarball":"https://registry.npmjs.org/upyun-legacy/-/upyun-legacy-0.4.0.tgz","integrity":"sha512-TUj9EVaVz366Wgnw2s5v4Hk69vXLpdNE2elJ2jnZfXNd5lXGKoaMsEQTVoIdlRzcquP6LNNwHHYb2wAdWtZ3og==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAzzZlgYpiBabL+bwYM0Cau9xzpRQFNlMTsPELcjFixdAiEAnsDZpOM9HFSV6JIfpV864CiO5aDTSmIBG11zeIukD0U="}]}},"0.4.1":{"name":"upyun-legacy","version":"0.4.1","description":"official upyun sdk for node.js","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@github.com:lisposter/node-upyun-legacy.git"},"keywords":["upyun","sdk","cdn","cloudstorage"],"author":{"name":"Leigh Zhu"},"license":"MIT","bugs":{"url":"https://github.com/lisposter/node-upyun-legacy/issues"},"homepage":"https://github.com/lisposter/node-upyun-legacy","devDependencies":{"istanbul":"^0.3.2","mocha":"~1.16.2","should":"~4.0.4"},"gitHead":"5a48bb72329d8412a10e3abe519aff239f1d6a2c","_id":"upyun-legacy@0.4.1","_shasum":"b06446579136e88fbb122b51030d3354902b1a6e","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"lisposter","email":"i@zhuli.me"},"maintainers":[{"name":"lisposter","email":"i@zhuli.me"}],"dist":{"shasum":"b06446579136e88fbb122b51030d3354902b1a6e","tarball":"https://registry.npmjs.org/upyun-legacy/-/upyun-legacy-0.4.1.tgz","integrity":"sha512-llX680gLZEbQNHhuua0IIS9Bi1uInldrfjoZQT2ZOGdJsmx376Q+GSEZWyljFUkJjjX01CPB+KRiArSdzDtA8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuG7cVv4Ttaoln9Ix+lJcQXAPP4dKRteJzWvMElSiSsAIgWlv0sRb8locVXoL6i24DFGJPELFZN/Zc1Cscx3C+Q4g="}]}},"0.4.5":{"name":"upyun-legacy","version":"0.4.5","description":"upyun sdk for node.js","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+ssh://git@github.com/lisposter/node-upyun-legacy.git"},"keywords":["upyun","sdk","cdn","cloudstorage"],"author":{"name":"Leigh Zhu"},"license":"MIT","bugs":{"url":"https://github.com/lisposter/node-upyun-legacy/issues"},"homepage":"https://github.com/lisposter/node-upyun-legacy","devDependencies":{"istanbul":"^0.3.2","mocha":"~1.16.2","should":"~4.0.4"},"gitHead":"30555acee66b523c8b824b226544acb44e9f109b","_id":"upyun-legacy@0.4.5","_shasum":"d28b2aa6b99e51d1643983c1d7f569703cd0e2cc","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"lisposter","email":"i@zhuli.me"},"dist":{"shasum":"d28b2aa6b99e51d1643983c1d7f569703cd0e2cc","tarball":"https://registry.npmjs.org/upyun-legacy/-/upyun-legacy-0.4.5.tgz","integrity":"sha512-V8xAbtKeqKWLXJj63YbrN9JpMU9cppIySNrIqnLI7o/CjqiW2cCFW1EIx9Sd2JzTFuUGaP+3773rb8BViSGsew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuZPVeFacLHXvCmA2r/9dlTMbuAQVWKWVeftDw1b/MMAIgU7aasoewqp8ed3cRwFgGCuIhbc6Zt+LLbgBsyrARMC4="}]},"maintainers":[{"name":"lisposter","email":"i@zhuli.me"}]}},"readme":"# node-upyun-legacy\n[![NPM version](https://img.shields.io/npm/v/upyun-legacy.svg?style=flat)](https://www.npmjs.org/package/upyun-legacy)\n[![Build status](https://img.shields.io/travis/lisposter/node-upyun-legacy.svg?style=flat)](https://travis-ci.org/lisposter/node-upyun-legacy)\n[![Test coverage](https://img.shields.io/coveralls/lisposter/node-upyun-legacy.svg?style=flat)](https://coveralls.io/r/lisposter/node-upyun-legacy?branch=master)\n\nupyun sdk for node.js (legacy)\n\n__NOTE__, this package has been moved to [upyun-classic](https://www.npmjs.com/package/upyun-classic)\n<br/>\n__NOTE__, this package has been moved to [upyun-classic](https://www.npmjs.com/package/upyun-classic)\n<br/>\n__NOTE__, this package has been moved to [upyun-classic](https://www.npmjs.com/package/upyun-classic)\n\n# Install\n\n```sh\n$ npm install upyun-legacy --save\n```\n\n# Example\n```js\nvar UPYUN = require('upyun-legacy');\n\nvar upyun = new UPYUN('testbucket', 'operatername', 'operaterpwd', 'v0');\n\nupyun.getUsage(function(err, result) {\n    //...\n})\n```\n\n# Response\nIn this SDK, every api will return a response in the format:\n\n#### Normal\n\n```js\n{\n    statusCode: 200,    // http status code\n    headers: {\n        server: 'nginx/1.1.19',\n        date: 'Wed, 13 Aug 2014 02:15:27 GMT',\n        'content-type': 'application/json',\n        'content-length': '24',\n        connection: 'close'\n    },                  // response header\n    data: {\n        space: 2501\n    }                   // response body\n}\n```\n\n#### Error catch\nWhen an error occured, the error will be catched, and returned in the response\n\n```js\n{\n    statusCode: 401,    // http status code\n    error: {\n        error_code: 401,\n        request_id: '9e7ce1bac4870ce5f066dd8775fda6b9',\n        message: '<h1>401 Unauthorized</h1>Sign error (sign = md5(METHOD&URI&DATE&CONTENT_LENGTH&MD5(PASSWORD)))'\n    },                  // error message\n    headers: {\n        server: 'nginx/1.1.19',\n        date: 'Wed, 13 Aug 2014 02:19:07 GMT',\n        'content-type': 'application/json',\n        'content-length': '145',\n        connection: 'close',\n        'www-authenticate': 'Basic realm=\"UpYun\"'\n    }                   // response header\n}\n```\n\nThe different between these two responses is the `error` and `body`.\n\nAll responses contain http status code and raw response header for futher usage.\n\n\n# Docs\n## API\n* [`getUsage`](#getUsage)\n* [`listDir`](#listDir)\n* [`createDir`](#createDir)\n* [`removeDir`](#removeDir)\n* [`uploadFile`](#uploadFile)\n* [`existsFile`](#existsFile)\n* [`downloadFile`](#downloadFile)\n* [`removeFile`](#removeFile)\n\n## Utils\n\n* [`setEndpoint`](#setEndpoint)\n\n\n# API\n\n<a name=\"getUsage\" />\n### getUsage(callback)\nTo get how many quota has been used.(Unit:`Byte`)\n\nresponse eg.\n\n```js\n{ statusCode: 200,\n  headers: { ... },\n  data: { space: '660612' } }\n```\n\n---------------------------------------\n\n<a name=\"listDir\" />\n### listDir(remotePath, callback)\nGet the file list of that dir. The response contains each item's type(file or dir), size(unit: `Byte`), last modify time.\n\n__Arguments__\n* `remotePath` The dir path which you want to traverse.\n\nresponse eg.\n\n```js\n{\n  \"statusCode\": 200,\n  \"headers\": { ... },\n  \"data\": {\n    \"location\": \"/\",\n    \"files\": [\n      {\n        \"name\": \"test_manual\",\n        \"type\": \"folder\",\n        \"length\": \"0\",\n        \"last_modified\": \"1411701197\"\n      },\n      {\n        \"name\": \"dir\",\n        \"type\": \"file\",\n        \"length\": \"0\",\n        \"last_modified\": \"1411546581\"\n      }\n    ]\n  }\n}\n```\n\n---------------------------------------\n\n<a name=\"createDir\" />\n### createDir(remotePath, callback)\nCreate a new dir in UPYUN bucket.\n\n__Arguments__\n* `remotePath` The dir path which you want to create.\n\n---------------------------------------\n\n<a name=\"removeDir\" />\n### removeDir(remotePath, callback)\nDelete a dir\n\n* `remotePath` The dir path which you want to remove.\n\n---------------------------------------\n\n<a name=\"uploadFile\" />\n### uploadFile(remotePath, localFile, type, [checksum], [opts], callback)\nUpload a file into UPYUN bucket.\n\n__Arguments__\n* `remotePath` Where the file will be stored in your UPYUN bucket.\n* `localFile` The file you want to upload. It can be a `path` string or the file's raw data.\n* `type` Specifies the file's content-type.\n* `checksum` Set `true` to force SDK send a md5 of local file to UPYUN. Or set a md5value string by yourself.\n* `opts` The additional http request headers(JavaScript Object). More detail in [Official Docs](http://docs.upyun.com/api/rest_api/#_4)\n\n```js\n {\n     statusCode: 200,\n     headers: { ... },\n     data: {\n         width: '400',\n         height: '200',\n         frames: '1',\n         type: 'PNG'\n     }\n }\n```\n\n---------------------------------------\n\n<a name=\"existsFile\" />\n### existsFile(remotePath, callback)\n`HEAD` a path to detect if there is an file.\n\n__Arguments__\n* `remotePath` The file's path in your UPYUN bucket.\n\n```js\n{\n    statusCode: 200,\n    headers: { ... },\n    data: {\n        type: 'file',\n        size: '1075',\n        date: '1407729976'\n    }\n}\n```\n\n---------------------------------------\n\n<a name=\"downloadFile\" />\n### downloadFile(remotePath, [localPath], callback)\nDownload a file from UPYUN bucket.\n\n__Arguments__\n* `remotePath` The file's path in your UPYUN bucket.\n* `localPath` Where the file will save to. If no `localPath`, the file's content will output directly in the response body.\n\n---------------------------------------\n\n<a name=\"removeFile\" />\n### removeFile(remotePath, callback)\nDelete a file from UPYUN bucket.\n\n__Arguments__\n* `remotePath` The file's path in your UPYUN bucket.\n\n# Utils\n\n<a name=\"setEndpoint\" />\n### setEndpoint(endpoint)\nUse this method to set api endpoint manually.\n\n__Arguments__\n* `endpoint` The value can be these(leave blank to let sdk auto select the best one):\n  * `ctcc` or `v1`: China Telecom\n  * `cucc` or `v2`: China Unicom\n  * `cmcc` or `v3` China Mobile\n  * `v0` or any other string: Will use `v0.api.upyun.com` (auto detect routing)\n\n","maintainers":[{"name":"lisposter","email":"i@zhuli.me"}],"time":{"modified":"2022-06-28T06:02:42.985Z","created":"2014-09-24T08:55:01.669Z","0.1.0":"2014-09-24T08:55:01.669Z","0.1.1":"2014-09-24T09:11:37.644Z","0.1.2":"2014-09-24T09:17:23.704Z","0.1.3":"2014-09-24T09:26:10.801Z","0.1.4":"2014-09-25T02:09:38.245Z","0.1.5":"2014-09-25T03:35:39.675Z","0.2.0":"2014-09-28T09:14:29.281Z","0.2.1":"2014-09-29T03:23:29.932Z","0.2.2":"2014-09-30T05:24:23.793Z","0.2.3":"2014-11-22T13:36:24.066Z","0.3.0":"2014-11-23T11:30:40.987Z","0.4.0":"2014-11-26T02:16:27.854Z","0.4.1":"2015-03-10T08:18:50.994Z","0.4.2":"2015-09-01T15:42:31.782Z","0.4.3":"2015-09-01T15:43:30.136Z","0.4.5":"2015-09-01T15:45:10.502Z"},"homepage":"https://github.com/lisposter/node-upyun-legacy","keywords":["upyun","sdk","cdn","cloudstorage"],"repository":{"type":"git","url":"git+ssh://git@github.com/lisposter/node-upyun-legacy.git"},"author":{"name":"Leigh Zhu"},"bugs":{"url":"https://github.com/lisposter/node-upyun-legacy/issues"},"license":"MIT","readmeFilename":"README.md"}