Type Method

writePlaceholder(at:withMetadata:)

Writes a document placeholder with the provided metadata.

Declaration

class func writePlaceholder(at placeholderURL: URL, withMetadata metadata: NSFileProviderItem) throws

Parameters

placeholderURL

The placeholder URL for the document. You can generate a placeholder URL from a document URL by calling placeholderURL(for:).

metadata

The metadata for this document.

Return Value

If the placeholder is written successfully, returns true; otherwise false.

Discussion

Call this method whenever you need to create a placeholder for a document. The metadata that you provide sets the data provided to the user in the browser interface.

See Also

Performing Actions

class func placeholderURL(for: URL) -> URL

Returns a placeholder URL for a given document URL.

func signalEnumerator(for: NSFileProviderItemIdentifier, completionHandler: (Error?) -> Void)

Alerts the system to changes in the specified folder's content.