intellibrix v1.0.0
    Preparing search index...

    Function readTextFile

    • Reads a UTF-8 file and its size through one handle, so the size describes the text returned. text is undefined, and the file is not read, when it is larger than maxBytes.

      Parameters

      • file: string
      • maxBytes: number = Number.POSITIVE_INFINITY

      Returns Promise<{ size: number; text?: string }>