Xbasic

FILE.APPEND Function

Syntax

Bytes_Appended as N = FILE.Append(C Filename, C content)

Bytes_Appended as N = FILE.Append(C Filename, B content)

Arguments

FilenameCharacter

The file that receives the character or blob data.

contentCharacter Binary

The content to add to the file. Content can be specified as either text or a blob data.

Returns

Bytes_AppendedNumeric

Returns the size increase of the file.

Description

Writes a string or blob to a file.

Discussion

The FILE.APPEND() method appends a blob or text to the end of a file. It does not add a line feed. The method creates the file if it does not already exist.

Example

? FILE.append("c:\test.txt", "this is text")
= 12

See Also