---
title: "update(_:forFileAt:)"
framework: corespotlight
role: symbol
role_heading: Instance Method
path: "corespotlight/csimportextension/update(_:forfileat:)"
---

# update(_:forFileAt:)

Provides searchable attributes for a file at the specified URL.

## Declaration

```swift
func update(_ attributes: CSSearchableItemAttributeSet, forFileAt contentURL: URL) throws
```

## Parameters

- `attributes`: The attribute set for the file at contentURL.
- `contentURL`: The URL of the file to provide attributes for.

## Discussion

Discussion When Core Spotlight invokes this method, update the properties of the attribute set according to the content in the specified file. For a complete list of properties available, see CSSearchableItemAttributeSet. important: Core Spotlight indexes files in batches and may call this method simultaneously on multiple queues with different values of contentURL.
