smartfile/ts/index.ts

16 lines
328 B
TypeScript
Raw Normal View History

2015-11-03 18:57:29 +00:00
/// <reference path="typings/tsd.d.ts" />
var path = require("path");
2015-11-03 19:14:41 +00:00
var fs = require("fs");
2015-11-03 18:57:29 +00:00
2015-11-03 19:14:41 +00:00
var smartfile:any = {
//read File to string
readFileToString: (filePath) => {
var fileString;
fileString = fs.readFileSync(filePath, "utf8");
return fileString;
}
2015-11-03 18:57:29 +00:00
};
2015-11-03 19:14:41 +00:00
module.exports = smartfile;