FileWriter
Supports file write operations
Operations
New
Opens a new file or appends to an existing one.
New(name:System.String, append:Bool)
Parameters
Name | Type | Description |
---|---|---|
name | String | filename |
append | Bool | if true, opens a file for appending otherwise creates a new file |
WriteBuffer
Writes bytes from a buffer
method : public : WriteBuffer(buffer:Byte[]) ~ Int
Parameters
Name | Type | Description |
---|---|---|
buffer | Byte | output buffer |
Return
Type | Description |
---|---|
Int | true if successful, false otherwise |
WriteBuffer
Writes bytes from a buffer
method : public : WriteBuffer(offset:Int, num:Int, buffer:Byte[]) ~ Int
Parameters
Name | Type | Description |
---|---|---|
offset | Int | destination buffer offset |
num | Int | number of values to write |
buffer | Byte | output buffer |
Return
Type | Description |
---|---|
Int | number of values written |
WriteBuffer
Writes characters from a buffer
method : public : WriteBuffer(buffer:Char[]) ~ Int
Parameters
Name | Type | Description |
---|---|---|
buffer | Char | output buffer |
Return
Type | Description |
---|---|
Int | true if successful, false otherwise |
WriteBuffer
Writes characters from a buffer
method : public : WriteBuffer(offset:Int, num:Int, buffer:Char[]) ~ Int
Parameters
Name | Type | Description |
---|---|---|
offset | Int | destination buffer offset |
num | Int | number of values to write |
buffer | Char | input buffer |
Return
Type | Description |
---|---|
Int | number of values written |
WriteByte
Writes a byte
method : public : WriteByte(b:Int) ~ Bool
Parameters
Name | Type | Description |
---|---|---|
b | Int | byte to write |
Return
Type | Description |
---|---|
Bool | true if byte was written, false otherwise |
WriteFile
Write string to file
function : WriteFile(name:String, content:String) ~ Bool
Parameters
Name | Type | Description |
---|---|---|
name | String | filename |
content | String | string to write |
Return
Type | Description |
---|---|
Bool | true if successful, false otherwise |
WriteFile
Write bytes to file
function : WriteFile(name:String, content:Byte[]) ~ Bool
Parameters
Name | Type | Description |
---|---|---|
name | String | filename |
content | Byte | to write |
Return
Type | Description |
---|---|
Bool | true if successful, false otherwise |
WriteString
Writes a character string
method : public : WriteString(str:System.String) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
str | String | string to be written |