How to use the text-buffer.loadSync function in text-buffer

To help you get started, we’ve selected a few text-buffer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github atom / atom / src / project.js View on Github external
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;
  }

text-buffer

A container for large mutable strings with annotated regions

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Similar packages