Function writeFileAndDir

  • Writes data to a file and creates the necessary directory structure if it doesn't exist.

    Parameters

    • path: string

      The path to the file.

    • Optionaldata: string | Uint8Array

      The data to write to the file.

    • Optionaloptions: WriteFileOptions

      The options for writing the file.

    Returns void