---
title: "pathsMatchingExtensions(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsarray/pathsmatchingextensions(_:)"
---

# pathsMatchingExtensions(_:)

Returns an array containing all the pathname elements in the receiving array that have filename extensions from a given array.

## Declaration

```swift
func pathsMatchingExtensions(_ filterTypes: [String]) -> [String]
```

## Parameters

- `filterTypes`: An array of NSString objects containing filename extensions. The extensions should not include the dot (”.”) character.

## Return Value

Return Value An array containing all the pathname elements in the receiving array that have filename extensions from the filterTypes array.
