happy-opfs
    Preparing search index...

    Function readTextFile

    • Reads a file as a UTF-8 string.

      Parameters

      • filePath: string

        The absolute path of the file to read.

      Returns AsyncIOResult<string>

      A promise that resolves to an AsyncIOResult containing the file content as a string.

      1.0.0

      (await readTextFile('/path/to/file.txt'))
      .inspect(content => console.log(content));