<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.10.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileWrapper/update(fromPath:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFileWrapper(im)updateFromPath:"
  },
  "title" : "update(fromPath:)"
}
-->

# update(fromPath:)

Updates the file wrapper to match a given file-system node.

```
func update(fromPath path: String) -> Bool
```

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the update is carried out, <doc://com.apple.documentation/documentation/Swift/false> if it isn’t needed.

## Discussion

For a directory file wrapper, the contained file wrappers are also sent [`update(fromPath:)`](/documentation/Foundation/FileWrapper/update(fromPath:)) messages. If nodes in the corresponding directory on the file system have been added or removed, corresponding file wrappers are released or created as needed.

### Special Considerations

Beginning with OS X v10.6, the preferred method of referring to files is with a `file://` URL. Therefore, this method has been deprecated in favor of [`read(from:options:)`](/documentation/Foundation/FileWrapper/read(from:options:)).

## See Also

[`-  updateAttachmentsFromPath:`](/documentation/Foundation/NSMutableAttributedString/updateAttachments(fromPath:))

Updates all attachments based on files contained in the RTFD file package at the specified file path.



---

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)