---
title: "pathContentOfSymbolicLink(atPath:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/filemanager/pathcontentofsymboliclink(atpath:)"
---

# pathContentOfSymbolicLink(atPath:)

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

## Declaration

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

## Parameters

- `path`: The path of a symbolic link.

## Return Value

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

Discussion Because this method does not return error information, it has been deprecated as of OS X v10.5. Use destinationOfSymbolicLink(atPath:) instead.

## See Also

### Related Documentation

- [destinationOfSymbolicLink(atPath:)](foundation/filemanager/destinationofsymboliclink(atpath:).md)
- [createSymbolicLink(atPath:withDestinationPath:)](foundation/filemanager/createsymboliclink(atpath:withdestinationpath:).md)

### Deprecated Methods

- [changeFileAttributes(_:atPath:)](foundation/filemanager/changefileattributes(_:atpath:).md)
- [fileAttributes(atPath:traverseLink:)](foundation/filemanager/fileattributes(atpath:traverselink:).md)
- [fileSystemAttributes(atPath:)](foundation/filemanager/filesystemattributes(atpath:).md)
- [directoryContents(atPath:)](foundation/filemanager/directorycontents(atpath:).md)
- [createDirectory(atPath:attributes:)](foundation/filemanager/createdirectory(atpath:attributes:).md)
- [createSymbolicLink(atPath:pathContent:)](foundation/filemanager/createsymboliclink(atpath:pathcontent:).md)
- [fileManager(_:shouldProceedAfterError:)](objectivec/nsobject-swift.class/filemanager(_:shouldproceedaftererror:).md)
- [fileManager(_:willProcessPath:)](objectivec/nsobject-swift.class/filemanager(_:willprocesspath:).md)
- [replaceItemAtURL(originalItemURL:withItemAtURL:backupItemName:options:)](foundation/filemanager/replaceitematurl(originalitemurl:withitematurl:backupitemname:options:).md)
