2016-05-19 22:31:53 +00:00
|
|
|
"use strict";
|
2017-03-04 20:10:46 +00:00
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
2016-07-17 15:34:15 +00:00
|
|
|
class Smartfile {
|
2017-03-04 20:10:46 +00:00
|
|
|
constructor(optionsArg) {
|
|
|
|
if (optionsArg.contentBuffer) {
|
|
|
|
this.contents = optionsArg.contentBuffer;
|
|
|
|
}
|
|
|
|
else if (optionsArg.contentsString) {
|
|
|
|
this.contents = new Buffer(optionsArg.contentsString);
|
|
|
|
}
|
|
|
|
this.path = optionsArg.path;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* set contents from string
|
|
|
|
* @param contentString
|
|
|
|
*/
|
|
|
|
setContentFromString(contentString) {
|
|
|
|
this.contents = new Buffer(contentString);
|
2016-05-19 22:31:53 +00:00
|
|
|
}
|
2016-07-17 15:34:15 +00:00
|
|
|
}
|
2016-05-19 22:31:53 +00:00
|
|
|
exports.Smartfile = Smartfile;
|
2017-03-04 20:10:46 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLmNsYXNzZXMuc21hcnRmaWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRmaWxlLmNsYXNzZXMuc21hcnRmaWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBUUE7SUFHRSxZQUFZLFVBQXdDO1FBQ2xELEVBQUUsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDO1lBQzdCLElBQUksQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLGFBQWEsQ0FBQTtRQUMxQyxDQUFDO1FBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQSxDQUFDLFVBQVUsQ0FBQyxjQUFjLENBQUMsQ0FBQyxDQUFDO1lBQ3BDLElBQUksQ0FBQyxRQUFRLEdBQUcsSUFBSSxNQUFNLENBQUMsVUFBVSxDQUFDLGNBQWMsQ0FBQyxDQUFBO1FBQ3ZELENBQUM7UUFDRCxJQUFJLENBQUMsSUFBSSxHQUFHLFVBQVUsQ0FBQyxJQUFJLENBQUE7SUFDN0IsQ0FBQztJQUVEOzs7T0FHRztJQUNILG9CQUFvQixDQUFDLGFBQXFCO1FBQ3hDLElBQUksQ0FBQyxRQUFRLEdBQUcsSUFBSSxNQUFNLENBQUMsYUFBYSxDQUFDLENBQUE7SUFDM0MsQ0FBQztDQUNGO0FBbkJELDhCQW1CQyJ9
|