ZenFS
    Preparing search index...

    Function readFile

    • Asynchronously reads the entire contents of a file.

      Parameters

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

      Returns Promise<Buffer<ArrayBufferLike>>

      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: V_Context
      • 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: V_Context
      • path: PathLike | FileHandle
      • Optional_options:
            | null
            | BufferEncoding
            | ObjectEncodingOptions & Abortable & { flag?: OpenMode | undefined }

      Returns Promise<string | Buffer<ArrayBufferLike>>

      the file data

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

      flag Defaults to 'r'.