---
title: NSFileProviderDomain
framework: fileprovider
role: symbol
role_heading: Class
path: fileprovider/nsfileproviderdomain
---

# NSFileProviderDomain

A File Provider extension’s domain.

## Declaration

```swift
class NSFileProviderDomain
```

## Overview

Overview You can use domains to partition a file provider’s content. When you use domains, a single file provider can act as if multiple file providers were installed, and users can dynamically switch from one domain to another. You can use domains to represent different accounts or locations. By default, a File Provider extension has no domain. You can register domains by calling the NSFileProviderManager class’s add(_:completionHandler:) method. A new NSFileProviderExtension instance is created for each domain that you register. The NSFileProviderExtension object’s domain property indicates which domain the file provider belongs to. Any items returned by that file provider also belong to the domain.

## Topics

### Creating domains

- [init(identifier:displayName:pathRelativeToDocumentStorage:)](fileprovider/nsfileproviderdomain/init(identifier:displayname:pathrelativetodocumentstorage:).md)
- [init(identifier:displayName:)](fileprovider/nsfileproviderdomain/init(identifier:displayname:).md)
- [NSFileProviderDomainIdentifier](fileprovider/nsfileproviderdomainidentifier.md)
- [init(displayName:userInfo:volumeURL:)](fileprovider/nsfileproviderdomain/init(displayname:userinfo:volumeurl:).md)

### Accessing data

- [displayName](fileprovider/nsfileproviderdomain/displayname.md)
- [identifier](fileprovider/nsfileproviderdomain/identifier.md)
- [isReplicated](fileprovider/nsfileproviderdomain/isreplicated.md)
- [backingStoreIdentity](fileprovider/nsfileproviderdomain/backingstoreidentity.md)
- [pathRelativeToDocumentStorage](fileprovider/nsfileproviderdomain/pathrelativetodocumentstorage.md)
- [isHidden](fileprovider/nsfileproviderdomain/ishidden.md)
- [userEnabled](fileprovider/nsfileproviderdomain/userenabled.md)
- [isDisconnected](fileprovider/nsfileproviderdomain/isdisconnected.md)
- [supportsSyncingTrash](fileprovider/nsfileproviderdomain/supportssyncingtrash.md)
- [userInfo](fileprovider/nsfileproviderdomain/userinfo.md)
- [volumeUUID](fileprovider/nsfileproviderdomain/volumeuuid.md)

### Syncing Desktop and Documents folders

- [replicatedKnownFolders](fileprovider/nsfileproviderdomain/replicatedknownfolders.md)
- [supportedKnownFolders](fileprovider/nsfileproviderdomain/supportedknownfolders.md)
- [NSFileProviderKnownFolders](fileprovider/nsfileproviderknownfolders.md)

### Supporting search

- [supportsStringSearchRequest](fileprovider/nsfileproviderdomain/supportsstringsearchrequest.md)

### Testing

- [testingModes](fileprovider/nsfileproviderdomain/testingmodes-swift.property.md)
- [NSFileProviderDomain.TestingModes](fileprovider/nsfileproviderdomain/testingmodes-swift.struct.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
