# ReadHandle

> You can use this handle to query the status of an asynchronous read operation. Note: To avoid a memory leak, you must call Dispose.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.IO.LowLevel.Unsafe](/engine/6000.6/script-reference/unity/io/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.CoreModule
* **Implements:** [IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

```csharp
public struct ReadHandle : IDisposable
```

## Properties

| Property                                                                                      | Description                                                                                                 |
| --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| [JobHandle](/engine/6000.6/script-reference/unity/io/lowlevel/unsafe/readhandle/jobhandle.md) | JobHandle that completes when the read operation completes.                                                 |
| [ReadCount](/engine/6000.6/script-reference/unity/io/lowlevel/unsafe/readhandle/readcount.md) | The number of read commands performed for this read operation. Will return zero until the reads have begun. |
| [Status](/engine/6000.6/script-reference/unity/io/lowlevel/unsafe/readhandle/status.md)       | Current state of the read operation.                                                                        |

## Methods

| Method                                                                                                        | Description                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Cancel](/engine/6000.6/script-reference/unity/io/lowlevel/unsafe/readhandle/cancel.md)                       | Cancels the [AsyncReadManager.Read](/engine/6000.6/script-reference/unity/io/lowlevel/unsafe/asyncreadmanager/read.md) operation on this handle.                                                                                                                |
| [Dispose](/engine/6000.6/script-reference/unity/io/lowlevel/unsafe/readhandle/dispose.md)                     | Disposes the ReadHandle. Use this to free up internal resources for reuse.                                                                                                                                                                                      |
| [GetBytesRead](/engine/6000.6/script-reference/unity/io/lowlevel/unsafe/readhandle/getbytesread.md)           | Returns the total number of bytes read by all the [ReadCommand](/engine/6000.6/script-reference/unity/io/lowlevel/unsafe/readcommand.md) operations the asynchronous file read request.                                                                         |
| [GetBytesReadArray](/engine/6000.6/script-reference/unity/io/lowlevel/unsafe/readhandle/getbytesreadarray.md) | Returns an array containing the number of bytes read by the [ReadCommand](/engine/6000.6/script-reference/unity/io/lowlevel/unsafe/readcommand.md) operations during the asynchronous file read request, where each index corresponds to the ReadCommand index. |
| [IsValid](/engine/6000.6/script-reference/unity/io/lowlevel/unsafe/readhandle/isvalid.md)                     | Check if the ReadHandle is valid.                                                                                                                                                                                                                               |
