<!--
{
  "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/createSymbolicLink(atPath:pathContent:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFileManager(im)createSymbolicLinkAtPath:pathContent:"
  },
  "title" : "createSymbolicLink(atPath:pathContent:)"
}
-->

# createSymbolicLink(atPath:pathContent:)

Creates a symbolic link identified by a given path that refers to a given location.

```
func createSymbolicLink(atPath path: String, pathContent otherpath: String) -> Bool
```

## Parameters

`path`

The path for a symbolic link.

`otherpath`

The path to which `path` should refer.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the operation is successful, otherwise <doc://com.apple.documentation/documentation/Swift/false>. Returns <doc://com.apple.documentation/documentation/Swift/false> if a file, directory, or symbolic link identical to `path` already exists.

## Discussion

Creates a symbolic link identified by `path` that refers to the location `otherPath` in the file system.

### Special Considerations

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

## See Also

[`removeItem(atPath:)`](/documentation/Foundation/FileManager/removeItem(atPath:))

Removes the file or directory at the specified path.

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

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

[`createSymbolicLink(atPath:withDestinationPath:)`](/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)