Function createReadStream

  • Opens a file in read mode and creates a Node.js-like ReadStream.

    Parameters

    • path: PathLike

      The path to the file to be opened.

    • Optionaloptions: BufferEncoding | ReadStreamOptions

      Options for the ReadStream and file opening (e.g., encoding, highWaterMark, mode).

    Returns ReadStream

    A ReadStream object for interacting with the file's contents.