---
title: directoryURL
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uidocumentpickerviewcontroller/directoryurl
---

# directoryURL

The initial directory that the document picker displays.

## Declaration

```swift
var directoryURL: URL? { get set }
```

## Mentioned in

Providing access to directories

## Discussion

Discussion Set this property to specify the starting directory for the document picker. This property defaults to nil. If you specify a value, the document picker tries to start at the specified directory. Otherwise, it starts with the last directory chosen by the user. The directoryURL property only returns a value when you explicitly set it. For example, it doesn’t calculate the default URL presented to the user when the property isn’t set. note: This property has no effect in Mac apps built with Mac Catalyst.

## See Also

### Getting the user-selected document

- [delegate](uikit/uidocumentpickerviewcontroller/delegate.md)
- [UIDocumentPickerDelegate](uikit/uidocumentpickerdelegate.md)
- [allowsMultipleSelection](uikit/uidocumentpickerviewcontroller/allowsmultipleselection.md)
