<!--
{
  "availability" : [
    "macOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FSKit",
  "identifier" : "/documentation/FSKit/FSVolume/RenameFlags",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "FSKit"
    ],
    "preciseIdentifier" : "c:@E@FSRenameFlags"
  },
  "title" : "FSVolume.RenameFlags"
}
-->

# FSVolume.RenameFlags

Behavior flags for a rename operation, corresponding to the flags accepted by `renamex_np(2)`.

```
struct RenameFlags
```

## Overview

FSKit passes these flags to [`renameItem(_:inDirectory:named:to:inDirectory:overItem:flags:context:replyHandler:)`](/documentation/FSKit/FSVolume/Handler/renameItem(_:inDirectory:named:to:inDirectory:overItem:flags:context:replyHandler:)) so that a volume can honor them atomically as part of the rename.

## Topics

### Initializers

[`init(rawValue: UInt)`](/documentation/FSKit/FSVolume/RenameFlags/init(rawValue:))

### Type Properties

[`static var exclusive: FSVolume.RenameFlags`](/documentation/FSKit/FSVolume/RenameFlags/exclusive)

Fail with `EEXIST` if the destination already exists, as with `RENAME_EXCL`.

[`static var swap: FSVolume.RenameFlags`](/documentation/FSKit/FSVolume/RenameFlags/swap)

Atomically exchange the source and destination items, as with `RENAME_SWAP`.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

---

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)