---
title: "init(linkName:linkAttributes:directoryAttributes:freeSpace:)"
framework: fskit
role: symbol
role_heading: Initializer
path: "fskit/fscreatelinkresult/init(linkname:linkattributes:directoryattributes:freespace:)"
---

# init(linkName:linkAttributes:directoryAttributes:freeSpace:)

Creates a result for a link-creation operation.

## Declaration

```swift
init?(linkName: FSFileName, linkAttributes: FSItem.Attributes, directoryAttributes: FSItem.Attributes, freeSpace: FSFreeSpace?)
```

## Parameters

- `linkName`: The name of the newly-created hard link.
- `linkAttributes`: The doc://FSKit/documentation/FSKit/FSItem/Attributes of the linked item (the target of the hard link).
- `directoryAttributes`: The updated doc://FSKit/documentation/FSKit/FSItem/Attributes of the parent directory.
- `freeSpace`: An doc://FSKit/documentation/FSKit/FSFreeSpace instance populated with the volume’s updated free space. Passing a nil free space causes FSKit to calculate the free space when the operation is done, based on the volume’s doc://FSKit/documentation/FSKit/FSVolume/Handler/volumeStatistics property. This behavior may lead to degraded performance.

## Return Value

Return Value A populated result instance, or nil if validation fails.

## See Also

### Creating a create-link result

- [FSFileName](fskit/fsfilename.md)
- [FSItem.Attributes](fskit/fsitem/attributes.md)
- [FSFreeSpace](fskit/fsfreespace.md)
