@tauri-apps/plugin-fs - v2.4.1
    Preparing search index...

    Function readTextFileLines

    • Returns an async AsyncIterableIterator over the lines of a file as UTF-8 string.

      Parameters

      Returns Promise<AsyncIterableIterator<string, any, any>>

      import { readTextFileLines, BaseDirectory } from '@tauri-apps/plugin-fs';
      const lines = await readTextFileLines('app.conf', { baseDir: BaseDirectory.AppConfig });
      for await (const line of lines) {
      console.log(line);
      }

      You could also call AsyncIterableIterator.next to advance the iterator so you can lazily read the next line whenever you want.

      2.0.0