Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
buildBufferSync(absoluteFilePath) {
const params = {
shouldDestroyOnFileDelete: this.shouldDestroyBufferOnFileDelete
};
let buffer;
if (absoluteFilePath != null) {
buffer = TextBuffer.loadSync(absoluteFilePath, params);
} else {
buffer = new TextBuffer(params);
}
this.addBuffer(buffer);
return buffer;
}