<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "System",
  "identifier" : "/documentation/System/FileDescriptor/OpenOptions/symlink",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "System"
    ],
    "preciseIdentifier" : "s:6System14FileDescriptorV11OpenOptionsV7symlinkAEvpZ"
  },
  "title" : "symlink"
}
-->

# symlink

Indicates that opening the file
opens symbolic links instead of following them.

```
static var symlink: FileDescriptor.OpenOptions { get }
```

## Discussion

If you specify this option
and the file path you pass to
<doc:FileDescriptor/open(_:_:options:permissions:retryOnInterrupt:)-2266j>
is a symbolic link,
then the link itself is opened instead of what it links to.

The corresponding C constant is `O_SYMLINK`.

---

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)