Todo.txt-Enyo/srv/ReadFileAssistant.js
2012-03-10 12:47:18 -05:00

15 lines
407 B
JavaScript

var ReadFileAssistant = function() {
}
ReadFileAssistant.prototype.run = function(future) {
var fs = IMPORTS.require("fs");
var path = this.controller.args.path
fs.readFile(path, 'utf8', function(err,data) {
//future.result = { path: path, content: data };
setTimeout(function () {
future.result = { path: path, content: data };
}, 100);
});
}