<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFURLWriteBookmarkDataToFile(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFURLWriteBookmarkDataToFile"
  },
  "title" : "CFURLWriteBookmarkDataToFile(_:_:_:_:)"
}
-->

# CFURLWriteBookmarkDataToFile(_:_:_:_:)

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

```
func CFURLWriteBookmarkDataToFile(_ bookmarkRef: CFData!, _ fileURL: CFURL!, _ options: CFURLBookmarkFileCreationOptions, _ errorRef: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool
```

## 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`.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)