Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter SixFile Functions (continued)

BufferToFile Function

Overview

The BufferToFile function writes the contents of a contiguous buffer into a file.

Syntax/Parameters

Syntax

int = BufferToFile ( var buffer, string name, [int size] );

Parameters

buffer

A variable (typically a char or byte array) that contains the data.

name

A string containing a qualified filename and path. If the file exists, it will be overwritten. This parameter supports UTF encoding for filenames with Unicode characters.

size

An optional int specifying the size of the data to write in bytes. If omitted, size is set to the size of the buffer parameter as either to depth or the allocated size. See Remarks below.

Return Value

Returns a int as ERROR_NONE or a formatted error code on failure.

Remarks

If the file exists, it will be overwritten.

The buffer must be an array of integer base type (char, byte, word, etc.), If a size if not provided, the

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic