---
title: "suggestedFileName(_:)"
framework: coretransferable
role: symbol
role_heading: Instance Method
path: "coretransferable/transferrepresentation/suggestedfilename(_:)-2yln2"
---

# suggestedFileName(_:)

Provides a filename to use if the receiver chooses to write the item to disk.

## Declaration

```swift
func suggestedFileName(_ fileName: String) -> some TransferRepresentation<Self.Item>

```

## Parameters

- `fileName`: The suggested filename including the filename extension. If several suggested file names are specified on an item, only the last one will be used.

## Discussion

Discussion Any transfer representation can be written to disk.  extension ImageDocumentLayer: Transferable {      static var transferRepresentation: some TransferRepresentation {          DataRepresentation(contentType: .layer) { layer in              layer.data()              } importing: { data in                  try ImageDocumentLayer(data: data)              }              .suggestedFileName("Layer.exampleLayer")          DataRepresentation(exportedContentType: .png) { layer in              layer.pngData()          }          .suggestedFileName("Layer")      }  } The .exampleLayer filename extension above should match the extension for the layer content type, which you declare in your app’s Info.plist file.
