<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URL/DirectoryHint",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation3URLV13DirectoryHintO"
  },
  "title" : "URL.DirectoryHint"
}
-->

# URL.DirectoryHint

A hint to URL file APIs for handling paths that may reference directories.

```
enum DirectoryHint
```

## Topics

### Hints

[`URL.DirectoryHint.isDirectory`](/documentation/Foundation/URL/DirectoryHint/isDirectory)

A hint that specifies that a given path is a directory.

[`URL.DirectoryHint.notDirectory`](/documentation/Foundation/URL/DirectoryHint/notDirectory)

A hint that specifies that a given path isn’t a directory.

[`URL.DirectoryHint.checkFileSystem`](/documentation/Foundation/URL/DirectoryHint/checkFileSystem)

A hint that directs a URL call to consult the file system to determine whether the path references a directory.

[`URL.DirectoryHint.inferFromPath`](/documentation/Foundation/URL/DirectoryHint/inferFromPath)

A hint that directs a URL call to infer whether a path references a directory based on whether it has a trailing slash.



---

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)