---
title: "probeResource(resource:replyHandler:)"
framework: fskit
role: symbol
role_heading: Instance Method
path: "fskit/fsunaryfilesystemoperations/proberesource(resource:replyhandler:)"
---

# probeResource(resource:replyHandler:)

Requests that the file system probe the specified resource.

## Declaration

```swift
func probeResource(resource: FSResource, replyHandler reply: @escaping @Sendable (FSProbeResult?, (any Error)?) -> Void)
```

```swift
func probeResource(resource: FSResource) async throws -> FSProbeResult
```

## Parameters

- `resource`: The doc://FSKit/documentation/FSKit/FSResource to probe.
- `reply`: A block or closure that your implementation invokes when it finishes the probe or encounters an error. Pass an instance of doc://FSKit/documentation/FSKit/FSProbeResult with probe results as the first parameter if your probe operation succeeds. If probing fails, pass an error as the second parameter.

## Discussion

Discussion Implement this method to indicate whether the resource is recognizable and usable.

## See Also

### Probing resources

- [FSProbeResult](fskit/fsproberesult.md)
