---
title: delegate
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/filemanager/delegate
---

# delegate

The delegate of the file manager object.

## Declaration

```swift
unowned(unsafe) var delegate: (any FileManagerDelegate)? { get set }
```

## Discussion

Discussion It is recommended that you assign a delegate to the file manager object only if you allocated and initialized the object yourself. Avoid assigning a delegate to the shared file manager obtained from the default method. The default value of this property is nil. When assigning a delegate to this property, your object must conform to the FileManagerDelegate protocol.
