archiveRootObject(_:toFile:)
Archives an object graph rooted at a given object to a file at a given path.
Declaration
class func archiveRootObject(_ rootObject: Any, toFile path: String) -> BoolParameters
- rootObject:
The root of the object graph to archive.
- path:
The path of the file in which to write the archive.
Return Value
Discussion
This method archives the graph formed by the root object to a data object, then atomically writes it to the given path. The format of the archive is PropertyListSerialization.PropertyListFormat.binary.