---
title: "update(fromPath:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/filewrapper/update(frompath:)"
---

# update(fromPath:)

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

## Declaration

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

## Return Value

Return Value true if the update is carried out, false if it isn’t needed.

## Discussion

Discussion For a directory file wrapper, the contained file wrappers are also sent 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:).

## See Also

### Related Documentation

- [updateAttachments(fromPath:)](foundation/nsmutableattributedstring/updateattachments(frompath:).md)

### Updating File Wrappers

- [needsToBeUpdated(fromPath:)](foundation/filewrapper/needstobeupdated(frompath:).md)
- [matchesContents(of:)](foundation/filewrapper/matchescontents(of:).md)
- [read(from:options:)](foundation/filewrapper/read(from:options:).md)
