Function readFileBuffer

  • Reads a file and returns the file's contents.

    Identical to

    Parameters

    • filepath: string

      The path to the file.

    Returns Promise<Buffer>

    See

    fs.promises.readFile, except that does not use an encoding.

  • Reads a file and returns the file's contents.

    Identical to

    Parameters

    • filepath: string

      The path to the file.

    • Optional callback: ((err, data) => void)

      An optional async callback.

        • (err, data): void
        • Parameters

          • err: null | ErrnoException
          • data: Buffer

          Returns void

    Returns void

    See

    fs.readFile (with callback), except that does not use an encoding.

Generated using TypeDoc