UNPKG

asm80

Version:
4 lines 550 B
var fs=require("fs");var path=require("path");module.exports={load:function(a,c){try{console.log("Processing: "+path.resolve(process.cwd(),a));if(c){return fs.readFileSync(path.resolve(process.cwd(),a)); }return fs.readFileSync(path.resolve(process.cwd(),a))+"";}catch(b){return null;}},loadRaw:function(a){try{return fs.readFileSync(path.resolve(process.cwd(),a)); }catch(b){return null;}},save:function(a,b){fs.writeFileSync(path.resolve(process.cwd(),a),b);},saveRaw:function(a,b){fs.writeFileSync(path.resolve(process.cwd(),a),new Buffer(b)); }};