• Asynchronous open(2) - open and possibly create a file.

    Parameters

    • path: PathLike

      A path to a file. If a URL is provided, it must use the file: protocol.

    • flags: OpenMode
    • Optional mode: null | Mode

      A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to 0o666.

    Returns Promise<number>