ZenFS
    Preparing search index...

    Function readFile

    • Asynchronously reads the entire contents of a file.

      Parameters

      • this: unknown
      • path: PathLike | FileHandle
      • Optionaloptions: { encoding?: null; flag?: OpenMode } & Abortable | null

      Returns Promise<NonSharedBuffer>

      the file data

      encoding The string encoding for the file contents. Defaults to null.

      flag Defaults to 'r'.

    • Asynchronously reads the entire contents of a file.

      Parameters

      • this: unknown
      • path: PathLike | FileHandle
      • options:
            | BufferEncoding
            | { encoding: BufferEncoding; flag?: OpenMode | undefined } & Abortable

      Returns Promise<string>

      the file data

      encoding The string encoding for the file contents. Defaults to null.

      flag Defaults to 'r'.

    • Asynchronously reads the entire contents of a file.

      Parameters

      • this: unknown
      • path: PathLike | FileHandle
      • Optional_options:
            | BufferEncoding
            | ObjectEncodingOptions & Abortable & { flag?: OpenMode | undefined }
            | null

      Returns Promise<string | NonSharedBuffer>

      the file data

      encoding The string encoding for the file contents. Defaults to null.

      flag Defaults to 'r'.