Function readFile

  • Read the entire contents of a file.

    Parameters

    Returns void

  • Read the entire contents of a file.

    Parameters

    • path: PathOrFileDescriptor

      directory path

    • options: {
          encoding?: null;
          flag?: string;
      } & Abortable

      read file options

    • callback: ReadFileCallback<Buffer>

      callback (err, data)

    Returns void

  • Read the entire contents of a file.

    Parameters

    • path: PathOrFileDescriptor

      directory path

    • options: BufferEncoding | {
          encoding: BufferEncoding;
          flag?: string;
      } & Abortable

      read file options

    • callback: ReadFileCallback<string>

      callback (err, data)

    Returns void

  • Read the entire contents of a file.

    Parameters

    Returns void

  • Read the entire contents of a file.

    Parameters

    Returns Promise<Buffer>

  • Read the entire contents of a file.

    Parameters

    • path: PathOrFileDescriptor

      directory path

    • options: {
          encoding?: null;
          flag?: string;
      } & Abortable

      read file options

    Returns Promise<Buffer>

  • Read the entire contents of a file.

    Parameters

    • path: PathOrFileDescriptor

      directory path

    • options: BufferEncoding | {
          encoding: BufferEncoding;
          flag?: string;
      } & Abortable

      read file options

    Returns Promise<string>

  • Read the entire contents of a file.

    Parameters

    Returns Promise<string | Buffer>

Generated using TypeDoc