<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macOS: 11.3.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FileProvider",
  "identifier" : "/documentation/FileProvider/NSFileProviderError/nonEvictableChildren",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "File Provider"
    ],
    "preciseIdentifier" : "s:SC23NSFileProviderErrorCodeLeV20nonEvictableChildrenSoAAVvpZ"
  },
  "title" : "nonEvictableChildren"
}
-->

# nonEvictableChildren

An error indicating that the File Provider extension can’t evict a directory because it contains nonevictable items.

```
static var nonEvictableChildren: NSFileProviderError.Code { get }
```

## Discussion

The [`NSFileProviderManager`](/documentation/FileProvider/NSFileProviderManager) throws this error when you attempt to evict a directory that contains items that it can’t evict. The system sets the error’s <doc://com.apple.documentation/documentation/Foundation/NSError/underlyingErrors> property to an array of errors that indicate the nonevictable content.

> Important:
> The system limits the number of items in the <doc://com.apple.documentation/documentation/Foundation/CocoaError/underlyingErrors> array, so it may not represent the complete list of nonevictable items in the directory.

The <doc://com.apple.documentation/documentation/Foundation/CocoaError/underlyingErrors> array contains the following possible values:

- `EBUSY`: The item has an open file descriptor.
- `EMLINK`: The item has too many hard links.
- [`NSFileProviderError.Code.nonEvictable`](/documentation/FileProvider/NSFileProviderError/Code/nonEvictable): The File Provider has marked the item as nonevictable.
- [`NSFileProviderError.Code.unsyncedEdits`](/documentation/FileProvider/NSFileProviderError/Code/unsyncedEdits): The item contains unsynced changes.

Each error has an <doc://com.apple.documentation/documentation/Foundation/NSURLErrorKey> to identify the file or directory that the error affects.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)