---
title: fileHandleForReading
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/pipe/filehandleforreading
---

# fileHandleForReading

The receiver’s read file handle.

## Declaration

```swift
var fileHandleForReading: FileHandle { get }
```

## Discussion

Discussion The descriptor represented by this object is deleted, and the object itself is automatically deallocated when the receiver is deallocated. You use the returned file handle to read from the pipe using NSFileHandle’s read methods—availableData, readDataToEndOfFile(), and readData(ofLength:). You don’t need to send closeFile() to this object or explicitly release the object after you have finished using it.

## See Also

### Getting the File Handles for a Pipe

- [fileHandleForWriting](foundation/pipe/filehandleforwriting.md)
