Todo.txt-Enyo/srv/ReadFileAssistant.js
2012-03-06 14:32:49 -05:00

16 lines
449 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 () {
console.log("delay test...");
future.result = { path: path, content: data };
}, 100);
});
}