Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-horse committed Aug 9, 2014
1 parent 1e8bbaa commit 173d655
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ $ npm install fs-cnpm

All the APIs are following [cnpm nfs guide](https://github.com/cnpm/cnpmjs.org/wiki/NFS-Guide).

- `uploadBuffer`
- `uploadBuffer`: upload a file

- `download`
- `download`: download file by key

- `remove`
- `remove`: remove file by key

### License

Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ Client.prototype.remove = function* (key) {
yield fs.unlink(filepath);
};

/**
* escape '/' and '\'
*/

Client.prototype._getpath = function (key) {
key = key.replace(/\//g, '-').replace(/\\/g, '_');
return path.join(this.dir, key);
Expand Down

0 comments on commit 173d655

Please sign in to comment.