---
title: "init(newName:renamedItemAttributes:sourceDirectoryAttributes:destinationDirectoryAttributes:overItemAttributes:freeSpace:)"
framework: fskit
role: symbol
role_heading: Initializer
path: "fskit/fsrenameitemresult/init(newname:renameditemattributes:sourcedirectoryattributes:destinationdirectoryattributes:overitemattributes:freespace:)"
---

# init(newName:renamedItemAttributes:sourceDirectoryAttributes:destinationDirectoryAttributes:overItemAttributes:freeSpace:)

Creates a result for an item-renaming operation.

## Declaration

```swift
init?(newName: FSFileName, renamedItemAttributes: FSItem.Attributes, sourceDirectoryAttributes: FSItem.Attributes, destinationDirectoryAttributes: FSItem.Attributes, overItemAttributes: FSItem.Attributes?, freeSpace: FSFreeSpace?)
```

## Parameters

- `newName`: The updated item name as it exists within the destination directory.
- `renamedItemAttributes`: The doc://FSKit/documentation/FSKit/FSItem/Attributes of the renamed item.
- `sourceDirectoryAttributes`: The updated doc://FSKit/documentation/FSKit/FSItem/Attributes of the source directory.
- `destinationDirectoryAttributes`: The updated doc://FSKit/documentation/FSKit/FSItem/Attributes of the destination directory.
- `overItemAttributes`: The doc://FSKit/documentation/FSKit/FSItem/Attributes of the overwritten item, if any. Pass nil if the action didn’t overwrite any item.
- `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 rename result

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