| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 exports.IO = {}; | 1 // |
| 2 // Fake nsIFile implementation for our I/O | |
| 3 // | |
| 4 function FakeFile(path) | |
| 5 { | |
| 6 this.path = path; | |
| 7 } | |
| 8 FakeFile.prototype = | |
| 9 { | |
| 10 get leafName() | |
| 11 { | |
| 12 return this.path; | |
| 13 }, | |
| 14 set leafName(value) | |
| 15 { | |
| 16 this.path = value; | |
| 17 }, | |
| 18 append: function(path) | |
| 19 { | |
| 20 this.path += path; | |
| 21 }, | |
| 22 clone: function() | |
| 23 { | |
| 24 return new FakeFile(this.path); | |
| 25 }, | |
| 26 get parent() | |
| 27 { | |
| 28 return {create: function() {}}; | |
| 29 }, | |
| 30 normalize: function() {} | |
| 31 }; | |
| 32 | |
| 33 | |
| 34 exports.IO = { | |
| 35 resolveFilePath: function(path) | |
| 36 { | |
| 37 return new FakeFile(path); | |
| 38 }, | |
| 39 statFile: function(path) | |
| 40 { | |
| 41 return true; | |
| 42 } | |
| 43 }; | |
| OLD | NEW |