<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileManager/DirectoryEnumerationOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSDirectoryEnumerationOptions"
  },
  "title" : "FileManager.DirectoryEnumerationOptions"
}
-->

# FileManager.DirectoryEnumerationOptions

Options for enumerating the contents of directories.

```
struct DirectoryEnumerationOptions
```

## Overview

These options are used with the [`contentsOfDirectory(at:includingPropertiesForKeys:options:)`](/documentation/Foundation/FileManager/contentsOfDirectory(at:includingPropertiesForKeys:options:)) method.

## Topics

### Creating a Directory Enumeration Options Value

[`init(rawValue:)`](/documentation/Foundation/FileManager/DirectoryEnumerationOptions/init(rawValue:))

Creates a directory enumeration options value.

### Directory Enumeration Options

[`NSDirectoryEnumerationSkipsSubdirectoryDescendants`](/documentation/Foundation/FileManager/DirectoryEnumerationOptions/skipsSubdirectoryDescendants)

An option to perform a shallow enumeration that doesn’t descend into directories.

[`NSDirectoryEnumerationSkipsPackageDescendants`](/documentation/Foundation/FileManager/DirectoryEnumerationOptions/skipsPackageDescendants)

An option to treat packages like files and not descend into their contents.

[`NSDirectoryEnumerationSkipsHiddenFiles`](/documentation/Foundation/FileManager/DirectoryEnumerationOptions/skipsHiddenFiles)

An option to skip hidden files.

## Relationships

### Conforms To

[`SetAlgebra`](/documentation/Swift/SetAlgebra)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`ExpressibleByArrayLiteral`](/documentation/Swift/ExpressibleByArrayLiteral)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`OptionSet`](/documentation/Swift/OptionSet)

---

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)