---
title: destination
framework: endpointsecurity
role: symbol
role_heading: Instance Property
path: endpointsecurity/es_event_create_t/destination
---

# destination

The file system destination of the created file.

## Declaration

```swift
var destination: es_event_create_t.__Unnamed_union_destination
```

## Discussion

Discussion To parse this union, check the destination_type to determine whether the file already exists: If the destination_type is ES_DESTINATION_TYPE_EXISTING_FILE, the union contains an es_file_t member called existing_file. If the destination_type is 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 called dir for the parent directory, an es_string_token_t called filename, and a mode_t called mode.

## See Also

### Inspecting Event Properties

- [destination_type](endpointsecurity/es_event_create_t/destination_type.md)
- [es_destination_type_t](endpointsecurity/es_destination_type_t.md)
- [reserved2](endpointsecurity/es_event_create_t/reserved2.md)
