---
title: FileDescriptor.OpenOptions
framework: system
role: symbol
role_heading: Structure
path: system/filedescriptor/openoptions
---

# FileDescriptor.OpenOptions

Options that specify behavior for a newly-opened file.

## Declaration

```swift
@frozen struct OpenOptions
```

## Topics

### Specifying Options

- [append](system/filedescriptor/openoptions/append.md)
- [closeOnExec](system/filedescriptor/openoptions/closeonexec.md)
- [create](system/filedescriptor/openoptions/create.md)
- [eventOnly](system/filedescriptor/openoptions/eventonly.md)
- [exclusiveCreate](system/filedescriptor/openoptions/exclusivecreate.md)
- [exclusiveLock](system/filedescriptor/openoptions/exclusivelock.md)
- [noFollow](system/filedescriptor/openoptions/nofollow.md)
- [nonBlocking](system/filedescriptor/openoptions/nonblocking.md)
- [sharedLock](system/filedescriptor/openoptions/sharedlock.md)
- [symlink](system/filedescriptor/openoptions/symlink.md)
- [truncate](system/filedescriptor/openoptions/truncate.md)

### Interacting with C APIs

- [init(rawValue:)](system/filedescriptor/openoptions/init(rawvalue:).md)
- [rawValue](system/filedescriptor/openoptions/rawvalue.md)

### Debugging

- [description](system/filedescriptor/openoptions/description.md)
- [debugDescription](system/filedescriptor/openoptions/debugdescription.md)

### Type Properties

- [directory](system/filedescriptor/openoptions/directory.md)

### Default Implementations

- [CustomDebugStringConvertible Implementations](system/filedescriptor/openoptions/customdebugstringconvertible-implementations.md)
- [CustomStringConvertible Implementations](system/filedescriptor/openoptions/customstringconvertible-implementations.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [Hashable](swift/hashable.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Opening a File

- [open(_:_:options:permissions:retryOnInterrupt:)](system/filedescriptor/open(_:_:options:permissions:retryoninterrupt:)-4ql4b.md)
- [open(_:_:options:permissions:retryOnInterrupt:)](system/filedescriptor/open(_:_:options:permissions:retryoninterrupt:)-5t3xn.md)
- [FileDescriptor.AccessMode](system/filedescriptor/accessmode.md)
