Deletes the record from its node and invalidates it.
SDK
- macOS 10.6+
Framework
- Open
Directory
Declaration
func delete() throws
Parameters
outError
An error reference for error details. Can be
nil
.
Return Value
true
if the record is successfully deleted; otherwise, false
.
Discussion
The record should be released after this method is called.
Handling Errors in Swift:
In Swift, this method returns Void
and is marked with the throws
keyword to indicate that it throws an error in cases of failure.
You call this method in a try
expression and handle any errors in the catch
clauses of a do
statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters.