---
title: FileDescriptor.AccessMode
framework: system
role: symbol
role_heading: Structure
path: system/filedescriptor/accessmode
---

# FileDescriptor.AccessMode

The desired read and write access for a newly opened file.

## Declaration

```swift
@frozen struct AccessMode
```

## Topics

### Creating an Access Mode

- [readOnly](system/filedescriptor/accessmode/readonly.md)
- [readWrite](system/filedescriptor/accessmode/readwrite.md)
- [writeOnly](system/filedescriptor/accessmode/writeonly.md)

### Debugging

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

### Working with C APIs

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

### Default Implementations

- [CustomDebugStringConvertible Implementations](system/filedescriptor/accessmode/customdebugstringconvertible-implementations.md)
- [CustomStringConvertible Implementations](system/filedescriptor/accessmode/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)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.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.OpenOptions](system/filedescriptor/openoptions.md)
