<!--
{
  "availability" : [
    "iOS: 2.0.0 - 2.0.0",
    "iPadOS: 2.0.0 - 2.0.0",
    "tvOS: 9.0.0 - 9.0.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 2.0.0 - 2.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileManager/pathContentOfSymbolicLink(atPath:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFileManager(im)pathContentOfSymbolicLinkAtPath:"
  },
  "title" : "pathContentOfSymbolicLink(atPath:)"
}
-->

# pathContentOfSymbolicLink(atPath:)

Returns the path of the directory or file that a symbolic link at a given path refers to.

```
func pathContentOfSymbolicLink(atPath path: String) -> String?
```

## Parameters

`path`

The path of a symbolic link.

## Return Value

The path of the directory or file to which the symbolic link `path` refers, or `nil` upon failure. If the symbolic link is specified as a relative path, that relative path is returned.

## Discussion

Because this method does not return error information, it has been deprecated as of OS X v10.5. Use [`destinationOfSymbolicLink(atPath:)`](/documentation/Foundation/FileManager/destinationOfSymbolicLink(atPath:)) instead.

## See Also

[`-  destinationOfSymbolicLinkAtPath:error:`](/documentation/Foundation/FileManager/destinationOfSymbolicLink(atPath:))

Returns the path of the item pointed to by a symbolic link.

[`-  createSymbolicLinkAtPath:withDestinationPath:error:`](/documentation/Foundation/FileManager/createSymbolicLink(atPath:withDestinationPath:))

Creates a symbolic link that points to the specified destination.



---

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)