---
title: URL.DirectoryHint
framework: foundation
role: symbol
role_heading: Enumeration
path: foundation/url/directoryhint
---

# URL.DirectoryHint

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

## Declaration

```swift
enum DirectoryHint
```

## Topics

### Hints

- [URL.DirectoryHint.isDirectory](foundation/url/directoryhint/isdirectory.md)
- [URL.DirectoryHint.notDirectory](foundation/url/directoryhint/notdirectory.md)
- [URL.DirectoryHint.checkFileSystem](foundation/url/directoryhint/checkfilesystem.md)
- [URL.DirectoryHint.inferFromPath](foundation/url/directoryhint/inferfrompath.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Creating a file URL from a string path

- [init(filePath:directoryHint:relativeTo:)](foundation/url/init(filepath:directoryhint:relativeto:).md)
- [init(fileURLWithPath:)](foundation/url/init(fileurlwithpath:).md)
- [init(fileURLWithPath:isDirectory:)](foundation/url/init(fileurlwithpath:isdirectory:).md)
- [init(fileURLWithPath:relativeTo:)](foundation/url/init(fileurlwithpath:relativeto:).md)
- [init(fileURLWithPath:isDirectory:relativeTo:)](foundation/url/init(fileurlwithpath:isdirectory:relativeto:).md)
- [init(fileURLWithFileSystemRepresentation:isDirectory:relativeTo:)](foundation/url/init(fileurlwithfilesystemrepresentation:isdirectory:relativeto:).md)
- [init(fileReferenceLiteralResourceName:)](foundation/url/init(filereferenceliteralresourcename:).md)
- [init(filePath:directoryHint:)](foundation/url/init(filepath:directoryhint:).md)
