OLD | NEW |
1 // | 1 // |
2 // No direct file system access, using FileSystem API | 2 // No direct file system access, using FileSystem API |
3 // | 3 // |
4 | 4 |
5 var IO = exports.IO = | 5 var IO = exports.IO = |
6 { | 6 { |
7 lineBreak: "\n", | 7 lineBreak: "\n", |
8 | 8 |
9 resolveFilePath: function(path) | 9 resolveFilePath: function(path) |
10 { | 10 { |
11 return new FakeFile(path); | 11 return new FakeFile(_fileSystem.resolve(path)); |
12 }, | 12 }, |
13 | 13 |
14 readFromFile: function(file, decode, listener, callback, timeLineID) | 14 readFromFile: function(file, decode, listener, callback, timeLineID) |
15 { | 15 { |
16 if ("spec" in file && /^defaults\b/.test(file.spec)) | 16 if ("spec" in file && /^defaults\b/.test(file.spec)) |
17 { | 17 { |
18 // Code attempts to read the default patterns.ini, we don't have that. | 18 // Code attempts to read the default patterns.ini, we don't have that. |
19 // Make sure to execute first-run actions instead. | 19 // Make sure to execute first-run actions instead. |
20 callback(null); | 20 callback(null); |
21 return; | 21 return; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 }, | 72 }, |
73 | 73 |
74 statFile: function(file, callback) | 74 statFile: function(file, callback) |
75 { | 75 { |
76 _fileSystem.stat(file.path, function(result) | 76 _fileSystem.stat(file.path, function(result) |
77 { | 77 { |
78 callback(result.error, result); | 78 callback(result.error, result); |
79 }); | 79 }); |
80 } | 80 } |
81 }; | 81 }; |
OLD | NEW |