Type Method

writeBookmarkData(_:to:)

Creates an alias file on disk at a specified location with specified bookmark data.

Declaration

static func writeBookmarkData(_ data: Data, to url: URL) throws

Discussion

The data must have been created with the suitableForBookmarkFile option. The url must either refer to an existing file (which will be overwritten), or to location in an existing directory.

See Also

Creating Bookmarks

static func bookmarkData(withContentsOf: URL) -> Data

Initializes and returns bookmark data derived from an alias file pointed to by a specified URL.

static func resourceValues(forKeys: Set<URLResourceKey>, fromBookmarkData: Data) -> URLResourceValues?

Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data.

typealias URL.BookmarkCreationOptions

An alias for bookmark creation options.

struct NSURL.BookmarkCreationOptions

Options used when creating bookmark data.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software