---
title: "init(newItem:newItemName:newItemAttributes:directoryAttributes:freeSpace:)"
framework: fskit
role: symbol
role_heading: Initializer
path: "fskit/fscreateitemresult/init(newitem:newitemname:newitemattributes:directoryattributes:freespace:)"
---

# init(newItem:newItemName:newItemAttributes:directoryAttributes:freeSpace:)

Creates a result for an item-creation operation.

## Declaration

```swift
init?(newItem: FSItem, newItemName: FSFileName, newItemAttributes: FSItem.Attributes, directoryAttributes: FSItem.Attributes, freeSpace: FSFreeSpace?)
```

## Parameters

- `newItem`: The newly-created doc://FSKit/documentation/FSKit/FSItem.
- `newItemName`: The name of the newly-created item as it exists within the file system.
- `newItemAttributes`: The doc://FSKit/documentation/FSKit/FSItem/Attributes of the newly-created item.
- `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 completes, 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-item result

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