<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileWrapper/fileWrappers",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFileWrapper(py)fileWrappers"
  },
  "title" : "fileWrappers"
}
-->

# fileWrappers

The file wrappers contained by a directory file wrapper.

```
var fileWrappers: [String : FileWrapper]? { get }
```

## Discussion

The dictionary contains entries whose values are the file wrappers and whose keys are the unique filenames that have been assigned to each one. See [Accessing File Wrapper Identities](https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileWrappers/FileWrappers.html#//apple_ref/doc/uid/TP40010672-CH13-SW1) in [File System Programming Guide](https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010672) for more information about the file-wrapper list structure.

This property may contain `nil` if the user modifies the directory after you call [`read(from:options:)`](/documentation/Foundation/FileWrapper/read(from:options:)) or [`init(url:options:)`](/documentation/Foundation/FileWrapper/init(url:options:)-70161) but before [`FileWrapper`](/documentation/Foundation/FileWrapper) has read the contents of the directory.  Use the [`immediate`](/documentation/Foundation/FileWrapper/ReadingOptions/immediate) reading option to reduce the likelihood of that problem.

### Special Considerations

This property raises `NSInternalInconsistencyException` if the file wrapper object is not a directory file wrapper.

## See Also

[`filename`](/documentation/Foundation/FileWrapper/filename)

The filename of the file wrapper object



---

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)