<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppleArchive",
  "identifier" : "/documentation/AppleArchive/ArchiveHeader/EntryXATBlob/apply(directory:path:flags:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Apple Archive"
    ],
    "preciseIdentifier" : "s:12AppleArchive0B6HeaderC12EntryXATBlobC5apply9directory4path5flagsy6System8FilePathV_AlA0B5FlagsVtKF"
  },
  "title" : "apply(directory:path:flags:)"
}
-->

# apply(directory:path:flags:)

Applies extended attributes to a filesystem object.

```
func apply(directory: FilePath, path: FilePath, flags: ArchiveFlags = []) throws
```

## Parameters

`directory`

The base directory of the filesystem object.

`path`

The path, relative to `directory`, to target filesystem object.

`flags`

Flags that control the behavior of the operation.

---

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)