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

# directoryAttributes

A dictionary with the attributes of the directory at which enumeration started.

```
var directoryAttributes: [FileAttributeKey : Any]? { get }
```

## Discussion

See the description of the [`fileAttributes(atPath:traverseLink:)`](/documentation/Foundation/FileManager/fileAttributes(atPath:traverseLink:)) method of [`FileManager`](/documentation/Foundation/FileManager) for details on obtaining the attributes from the dictionary.

## See Also

[`-  createDirectoryAtPath:attributes:`](/documentation/Foundation/FileManager/createDirectory(atPath:attributes:))

Creates a directory (without contents) at a given path with given attributes.



---

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)