<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "EndpointSecurity",
  "identifier" : "/documentation/EndpointSecurity/es_event_rename_t/destination",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Endpoint Security"
    ],
    "preciseIdentifier" : "c:@SA@es_event_rename_t@FI@destination"
  },
  "title" : "destination"
}
-->

# destination

The destination of the rename operation.

```
var destination: es_event_rename_t.__Unnamed_union_destination
```

## Discussion

To parse this `union`, check the [`destination_type`](/documentation/EndpointSecurity/es_event_rename_t/destination_type) to determine whether the rename event’s destination file already exists:

- If the [`destination_type`](/documentation/EndpointSecurity/es_event_rename_t/destination_type) is [`ES_DESTINATION_TYPE_EXISTING_FILE`](/documentation/EndpointSecurity/ES_DESTINATION_TYPE_EXISTING_FILE), the union contains an [`es_file_t`](/documentation/EndpointSecurity/es_file_t) member called `existing_file`.
- If the [`destination_type`](/documentation/EndpointSecurity/es_event_rename_t/destination_type) is [`ES_DESTINATION_TYPE_NEW_PATH`](/documentation/EndpointSecurity/ES_DESTINATION_TYPE_NEW_PATH), the union contains a `struct` called `new_path`, indicating the file’s proposed destination. The structure consists of an [`es_file_t`](/documentation/EndpointSecurity/es_file_t) called `dir` for the parent directory, and an [`es_string_token_t`](/documentation/EndpointSecurity/es_string_token_t) called `filename`.

---

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)