Introduction
File.write lets you save text or data directly into a file quickly and easily.
You want to save user input into a file.
You need to create a new file with some content.
You want to overwrite an existing file with new data.
You want to log messages or results into a file.
You want to save program output for later use.