Writes data to a file and creates the necessary directory structure if it doesn't exist.
The path to the file.
Optional
The data to write to the file.
The options for writing the file.
Writes data to a file and creates the necessary directory structure if it doesn't exist.