---
title: fileDescriptor
framework: dispatch
role: symbol
role_heading: Instance Property
path: dispatch/dispatchio/filedescriptor
---

# fileDescriptor

Returns the file descriptor associated with the specified channel.

## Declaration

```swift
var fileDescriptor: Int32 { get }
```

## Discussion

Discussion If the path name associated with the channel has not yet been opened, calling this function does not normally open the corresponding file, with one exception. If you call the function from a barrier block scheduled on the channel, the function does open the file and return the resulting file descriptor.

## See Also

### Managing the File Descriptor

- [setLimit(highWater:)](dispatch/dispatchio/setlimit(highwater:).md)
- [setLimit(lowWater:)](dispatch/dispatchio/setlimit(lowwater:).md)
- [setInterval(interval:flags:)](dispatch/dispatchio/setinterval(interval:flags:).md)
- [DispatchIO.IntervalFlags](dispatch/dispatchio/intervalflags.md)
