Writes the bytes in the receiver to the file specified by a given path.
- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
The location to which to write the receiver's bytes. If
pathcontains a tilde (~) character, you must expand it with
expandingbefore invoking this method.
Tilde In Path
true, the data is written to a backup file, and then—assuming no errors occur—the backup file is renamed to the name specified by
path; otherwise, the data is written directly to