diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 8b6678b..9afd05b 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartfile', - version: '10.0.36', + version: '10.0.37', description: 'offers smart ways to work with files in nodejs' } diff --git a/ts/smartfile.classes.smartfile.ts b/ts/smartfile.classes.smartfile.ts index 738c3f8..a561340 100644 --- a/ts/smartfile.classes.smartfile.ts +++ b/ts/smartfile.classes.smartfile.ts @@ -155,7 +155,7 @@ export class Smartfile extends plugins.smartjson.Smartjson { * @param contentString */ public setContentsFromString(contentString: string, encodingArg: 'utf8' | 'binary' = 'utf8') { - this.contents = new Buffer(contentString, encodingArg); + this.contents = Buffer.from(contentString, encodingArg); } /**