---
title: "FSEventStreamGetDeviceBeingWatched(_:)"
framework: Core Services
role: symbol
role_heading: Function
platforms: [Mac Catalyst 13.1+, macOS 10.5+]
path: coreservices/1449675-fseventstreamgetdevicebeingwatch
---

# FSEventStreamGetDeviceBeingWatched(_:)

## Declaration

```swift
func FSEventStreamGetDeviceBeingWatched(_ streamRef: ConstFSEventStreamRef) -> dev_t
```

## Parameters

- `streamRef`: A valid stream.

## Return Value

Return Value The dev_t for a device-relative stream, otherwise 0.

## Discussion

Discussion Fetches the dev_t supplied when the stream was created via FSEventStreamCreateRelativeToDevice(), otherwise 0.
