---
name: "VistaIOWriteFile"
section: "3"
platform: "linux"
package: "libvistaio-dev"
version: "1.2.19-3+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/VistaIOWriteFile"
---

# VistaIOWriteFile(3)

write a Vista data file

## NAME

VistaIOWriteFile - write a Vista data file

## SYNOPSIS

```
#include <stdio>
#include <vistaio.h>
```

**VistaIOBoolean VistaIOWriteFile (***file***,** *list***)**

**FILE \****file***;** **VistaIOAttrList** *list***;**

## ARGUMENTS

- *file*

  **Specifies the open stream to which the data file should be written.**

- *list*

  **Specifies the list of attributes to be written.**

## DESCRIPTION

**VistaIOWriteFile writes an attribute list as a Vista data file. Attributes are written in the order**  **that they appear in the list. As they are written, attribute values are**  **converted from internal form (e.g., a VistaIOImage data structure) to**  **external form according to the conventions described by**  **[VistaIOattribute(3)](/VistaIOattribute/3.md) and [VistaIOtype(3)](/VistaIOtype/3.md).**

## RETURN VALUE

**If VistaIOWriteFile is successful it returns** **TRUE** **. In this case it will have written everything from the Vista data file**  **header to the last byte of binary data. If VistaIOWriteFile encounters an**  **error, however, it returns**  **FALSE** **while perhaps leaving the file incomplete.**

## SEE ALSO

[**VistaIOWriteImages**(3)](/VistaIOWriteImages/3.md), [**VistaIOWriteObjects**(3)](/VistaIOWriteObjects/3.md), **VistaIOWriteUbcIff**(3), [**stdio**(3)](/stdio/3.md),\
 [**VistaIOtype**(3)](/VistaIOtype/3.md)

## NOTES

**Data is written to the stream sequentially, permitting the stream to be a**  **pipe. No rewind is performed either before writing or after.**

## DIAGNOSTICS

- \`\`*name* attribute has unwriteable representation: *repn*.''

  **The named attribute has a value that cannot be converted to external**  **form. A VistaIOPointer value, for example, has no external form.**

- \`\`Write to stream failed.''

  **A write to** *file* **failed because of an I/O error or a corrupt data**  **structure.**

## AUTHOR

**Art Pope \<pope@cs.ubc.ca\>**

**Adaption to vistaio: Gert Wollny \<gw.fossdev@gmail.com\>**
