---
name: "Binary.writeBlock"
section: "3kaya"
platform: "linux"
package: "kaya"
version: "0.4.4-6.2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/Binary.writeBlock"
---

# Binary.writeBlock(3kaya)

Write a block to a file.

## NAME

Binary::writeBlock - Write a block to a file.

## SYNOPSIS

**Void writeBlock(** *File h, Binary block* **)**

## ARGUMENTS

**h** A file handle to write to

**block** The binary data

## DESCRIPTION

Write the contents of a Binary block to a file. The file must already be open and writable, of course. A **IO.FileError (3kaya)** Exception will be thrown if the block was not written in its entirety.

## AUTHORS

Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/

## LICENSE

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

## RELATED

**Binary.Binary (3kaya)**

**IO(3kaya)**

**Binary.readBlock (3kaya)**
