Function

CFURLWriteBookmarkDataToFile

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

Declaration

Boolean CFURLWriteBookmarkDataToFile(CFDataRef bookmarkRef, CFURLRef fileURL, CFURLBookmarkFileCreationOptions options, CFErrorRef *errorRef);

Parameters

bookmarkRef

The bookmark data containing information for the alias file.

fileURL

The desired location of the alias file.

options

Options taken into account when creating the alias file.

errorRef

The error that occurred in the case that the alias file cannot be created.

Return Value

true if the alias file is successfully created; otherwise, false.

See Also

Working with Bookmark Data

CFURLCreateBookmarkData

Returns bookmark data for a URL, created with specified options and resource values.

CFURLCreateBookmarkDataFromAliasRecord

Initializes and returns bookmark data derived from an alias record.

CFURLCreateBookmarkDataFromFile

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

CFURLStartAccessingSecurityScopedResource

In an app that has adopted App Sandbox, makes the resource pointed to by a security-scoped URL available to the app.

CFURLStopAccessingSecurityScopedResource

In an app that adopts App Sandbox, revokes access to the resource pointed to by a security-scoped URL.