---
title: stateDirectoryURL()
framework: fileprovider
role: symbol
role_heading: Instance Method
path: fileprovider/nsfileprovidermanager/statedirectoryurl()
---

# stateDirectoryURL()

Returns a URL for a directory for storing state information for the domain.

## Declaration

```swift
func stateDirectoryURL() throws -> URL
```

## See Also

### Working with external volumes

- [checkDomainsCanBeStoredOnVolume(at:)](fileprovider/nsfileprovidermanager/checkdomainscanbestoredonvolume(at:).md)
- [NSFileProviderManager.EligibilityResult](fileprovider/nsfileprovidermanager/eligibilityresult.md)
- [NSFileProviderExternalVolumeHandling](fileprovider/nsfileproviderexternalvolumehandling.md)
