Creates a new file, writes a collection of strings to the file, and then closes the file.
is a zero-length string, contains only white space, or contains one or more invalid characters as defined by . Either or is . The specified path is invalid (for example, it is on an unmapped drive). The file specified in was not found. An I/O error occurred while opening the file.
/// The specified path, file name, or both exceed the system-defined maximum length.
/// For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.
/// is in an invalid format. The caller does not have the required permission.
/// specified a file that is read-only.
/// -or-
/// This operation is not supported on the current platform.
/// -or-
/// specified a directory.
/// -or-
/// The caller does not have the required permission.
///