Skip to content

Commit

Permalink
Added a toString function that returns name and path of the file (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
taddei authored and GrosSacASac committed Nov 30, 2019
1 parent 4cf4e16 commit db3f376
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/file.js
Expand Up @@ -51,6 +51,10 @@ File.prototype.toJSON = function() {
return json;
};

File.prototype.toString = function () {
return "File:" + this.name + ", Path:" + this.path;
};

File.prototype.write = function(buffer, cb) {
var self = this;
if (self.hash) {
Expand Down

0 comments on commit db3f376

Please sign in to comment.