All Bundles

FileWriter

Supports file write operations

Derived from: File

Operations

New

Opens a new file.

New(name:System.String)
Parameters
NameTypeDescription
nameStringfilename

Opens a new file or appends to an existing one.

New(name:System.String, append:Bool)
Parameters
NameTypeDescription
nameStringfilename
appendBoolif true, opens a file for appending otherwise creates a new file

Close

Closes a file

method : public : Close() ~ Nil

Temp

Creates a temporary file

function : Temp() ~ FileWriter

WriteBuffer

Writes bytes from a buffer

method : public : WriteBuffer(buffer:Byte[]) ~ Int
Parameters
NameTypeDescription
bufferByte[]output buffer

Return
TypeDescription
Inttrue if successful, false otherwise

Writes bytes from a buffer

method : public : WriteBuffer(offset:Int, num:Int, buffer:Byte[]) ~ Int
Parameters
NameTypeDescription
offsetIntdestination buffer offset
numIntnumber of values to write
bufferByte[]output buffer

Return
TypeDescription
Intnumber of values written

Writes characters from a buffer

method : public : WriteBuffer(buffer:Char[]) ~ Int
Parameters
NameTypeDescription
bufferChar[]output buffer

Return
TypeDescription
Inttrue if successful, false otherwise

Writes characters from a buffer

method : public : WriteBuffer(offset:Int, num:Int, buffer:Char[]) ~ Int
Parameters
NameTypeDescription
offsetIntdestination buffer offset
numIntnumber of values to write
bufferChar[]input buffer

Return
TypeDescription
Intnumber of values written

WriteByte

Writes a byte

method : public : WriteByte(b:Int) ~ Bool
Parameters
NameTypeDescription
bIntbyte to write

Return
TypeDescription
Booltrue if byte was written, false otherwise

WriteFile

Write string to file

function : WriteFile(name:String, content:String) ~ Bool
Parameters
NameTypeDescription
nameStringfilename
contentStringstring to write

Return
TypeDescription
Booltrue if successful, false otherwise

Write bytes to file

function : WriteFile(name:String, content:Byte[]) ~ Bool
Parameters
NameTypeDescription
nameStringfilename
contentByte[]to write

Return
TypeDescription
Booltrue if successful, false otherwise

WriteString

Writes a character string

method : public : WriteString(str:System.String) ~ Nil
Parameters
NameTypeDescription
strStringstring to be written