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

# needsToBeUpdated(fromPath:)

Indicates whether the file wrapper needs to be updated to match a given file-system node.

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

## Parameters

`path`

file-system node with which to compare the file wrapper.

## Return Value

<doc://com.apple.documentation/documentation/Swift/false> when the file wrapper needs to be updated to match `node`, <doc://com.apple.documentation/documentation/Swift/false> otherwise.

## Discussion

This table describes which attributes of the file wrapper and `node` are compared to determine whether the file wrapper needs to be updated:

|File-wrapper type|Comparison determinants                  |
|-----------------|-----------------------------------------|
|Regular file     |Modification date and access permissions.|
|Directory        |Member hierarchy (recursive).            |
|Symbolic link    |Destination pathname.                    |

### 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 [`matchesContents(of:)`](/documentation/Foundation/FileWrapper/matchesContents(of:)).

## See Also

[`fileAttributes`](/documentation/Foundation/FileWrapper/fileAttributes)

A dictionary of file attributes.



---

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)