<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileWrapper/WritingOptions/withNameUpdating",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSFileWrapperWritingOptions@NSFileWrapperWritingWithNameUpdating"
  },
  "title" : "withNameUpdating"
}
-->

# withNameUpdating

Whether descendant file wrappers’[`filename`](/documentation/Foundation/FileWrapper/filename) properties are set if the writing succeeds.

```
static var withNameUpdating: FileWrapper.WritingOptions { get }
```

## Discussion

This option is necessary when your application passes a URL in the `originalContentsURL` parameter to the [`write(to:options:originalContentsURL:)`](/documentation/Foundation/FileWrapper/write(to:options:originalContentsURL:)) method. Without using this option (and reusing child file wrappers properly), subsequent invocations of [`write(to:options:originalContentsURL:)`](/documentation/Foundation/FileWrapper/write(to:options:originalContentsURL:)) would not be able to reliably create hard links in a new file package, because the record of names in the old file package would be out of date.

---

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)