# OpcFileWriteMethodNode.FileWriteCallback Delegate

<dl class="api-definition">
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
</dl>

Write is used to write a part of the file starting from the current file position. The file position is advanced by the number of bytes written.

## Syntax

<div class="api-signature" data-lang="csharp">

```csharp
public delegate void OpcFileWriteMethodNode.FileWriteCallback(
    uint fileHandle,
    ByteString data)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
<CLSCompliant(False)>
Public Delegate Sub OpcFileWriteMethodNode.FileWriteCallback(
    fileHandle As UInteger,
    data As ByteString)
```

</div>

## Parameters

| Name | Type | Description |
|---|---|---|
| `fileHandle` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | A file handle indicating the access request and thus indirectly the position inside the file. |
| `data` | [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) | Contains the data to be written at the position of the file. It is server-dependent whether the written data are persistently stored if the session is ended without calling the Close Method with the file handle. |

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.5–v2.59 |
