---
title: "files(_:)"
framework: corespotlight
role: symbol
role_heading: Type Method
path: "corespotlight/searchsource/files(_:)"
---

# files(_:)

Returns a source that retrieves data from the files and directories you specify.

## Declaration

```swift
static func files(_ source: FileSource) -> SearchSource
```

## See Also

### Searching files and directories

- [files](corespotlight/searchsource/files.md)
