fileWriteString

Writes a length-prefixed string to a file. Takes a file handle and a string. Returns nothing (void).

File IO

Parameters & Returns

Parameters

fileHandle Int
str String

Returns

Void

Quick Summary

Writes a length-prefixed string to a file. Takes a file handle and a string. Returns nothing (void).

Technical Exegesis...

Writes a string to the file in a length-prefixed format: first writes a 4-byte integer length (using strlen), then writes the string data without null terminator. Does nothing if the handle or string is invalid.

This format matches what fileReadString expects. The 4-byte length header is followed by the exact string bytes. Use fileWriteLine for text files with newlines instead.

Example

Example.bam
; No example implemented yet