---
title: "collectionView(_:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAt:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscollectionviewdelegate/collectionview(_:namesofpromisedfilesdroppedatdestination:fordraggeditemsat:)-wwec"
---

# collectionView(_:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAt:)

Invoked to return an array of filenames that the receiver promises to create.

## Declaration

```swift
optional func collectionView(_ collectionView: NSCollectionView, namesOfPromisedFilesDroppedAtDestination dropURL: URL, forDraggedItemsAt indexes: IndexSet) -> [String]
```

## Parameters

- `collectionView`: The collection view that send the message.
- `dropURL`: The drop location where the files are created.
- `indexes`: The indexes of the dragging items.

## Return Value

Return Value An array of filenames (not full paths) for the created files that the receiver promises to create.

## Discussion

Discussion The delegate can support file promise drags by adding NSFilesPromisePboardType to the pasteboard in collectionView(_:writeItemsAt:to:). For more information on file promise dragging, see documentation for the NSDraggingSource protocol and namesOfPromisedFilesDropped(atDestination:). You do not need to implement this delegate method for your collection view to be a drag source.

## See Also

### Legacy Collection View Support

- [collectionView(_:canDragItemsAt:with:)](appkit/nscollectionviewdelegate/collectionview(_:candragitemsat:with:)-39rjh.md)
- [collectionView(_:pasteboardWriterForItemAt:)](appkit/nscollectionviewdelegate/collectionview(_:pasteboardwriterforitemat:)-7ldvs.md)
- [collectionView(_:writeItemsAt:to:)](appkit/nscollectionviewdelegate/collectionview(_:writeitemsat:to:)-a1lk.md)
- [collectionView(_:draggingImageForItemsAt:with:offset:)](appkit/nscollectionviewdelegate/collectionview(_:draggingimageforitemsat:with:offset:)-4yvk5.md)
- [collectionView(_:draggingSession:willBeginAt:forItemsAt:)](appkit/nscollectionviewdelegate/collectionview(_:draggingsession:willbeginat:foritemsat:)-cpuq.md)
- [collectionView(_:validateDrop:proposedIndex:dropOperation:)](appkit/nscollectionviewdelegate/collectionview(_:validatedrop:proposedindex:dropoperation:).md)
- [collectionView(_:acceptDrop:index:dropOperation:)](appkit/nscollectionviewdelegate/collectionview(_:acceptdrop:index:dropoperation:).md)
