Index: lib/io.js |
diff --git a/lib/io.js b/lib/io.js |
index b3a8326b4fab275d5202544139ba4d1a7b78f1d3..143787db0c55f775aa6eeeaed73d16ff179e9f57 100644 |
--- a/lib/io.js |
+++ b/lib/io.js |
@@ -47,11 +47,13 @@ exports.IO = |
readFromFile(fileName, listener) |
{ |
- return readFileAsync(fileName).then((result) => |
+ return new Promise((resolve, reject) => |
{ |
- let lines = result.content.split(/[\r\n]+/); |
- for (let line of lines) |
- listener(line); |
+ _fileSystem.readFromFile(fileName, listener, (error) => { |
+ if (error) |
+ return reject(error); |
+ resolve(); |
+ }); |
}); |
}, |