Writes the contents of the array to a file at a given path.
- iOS 2.0–11.0Deprecated
- macOS 10.0–10.13Deprecated
- UIKit for Mac 13.0–13.0Deprecated
- tvOS 9.0–11.0Deprecated
- watchOS 2.0–4.0Deprecated
The path at which to write the contents of the array.
pathcontains a tilde (~) character, you must expand it with
stringbefore invoking this method.
By Expanding Tilde In Path
YES, the array is written to an auxiliary file, and then the auxiliary file is renamed to
NO, the array is written directly to
YESoption guarantees that
path, if it exists at all, won’t be corrupted even if the system should crash during writing.
YES if the file is written successfully, otherwise
If the array’s contents are all property list objects (
NSDictionary objects), the file written by this method can be used to initialize a new array with the class method
array or the instance method
init. This method recursively validates that all the contained objects are property list objects before writing out the file, and returns
NO if all the objects are not property list objects, since the resultant file would not be a valid property list.