---
title: pipe()
framework: system
role: symbol
role_heading: Type Method
path: system/filedescriptor/pipe()
---

# pipe()

Creates a unidirectional data channel, which can be used for interprocess communication.

## Declaration

```swift
static func pipe() throws -> (readEnd: FileDescriptor, writeEnd: FileDescriptor)
```

## Return Value

Return Value The pair of file descriptors.

## Discussion

Discussion The corresponding C function is pipe.
