Function readFileSync

  • Reads a file and returns the file's contents. Identical to fs.readFileSync, except that it uses utf8 encoding by default.

    Parameters

    • filepath: string

      The path to the file.

    • encoding: BufferEncoding = 'utf8'

      The encoding to use when reading the file.

    Returns string

    The file's contents.

Generated using TypeDoc