Overload | Description |
---|---|
print(obj: Int) -> () |
Prints obj to stdout
|
print(obj: Float) -> () |
|
print(obj: Bool) -> () |
|
print(obj: Str) -> () |
|
print(obj: &Int | @Int) -> () |
|
print(obj: &Float | @Float) -> () |
|
print(obj: &Bool | @Bool) -> () |
|
print(obj: &Str | @Str) -> () |
Overload | Description |
---|---|
get_file(path: String) -> File |
Gets handle for the file located at path
|
Overload | Description |
---|---|
open(file: @File, r: Bool, w: Bool, a: Bool) -> () |
Opens file with permissions to read (r ), write (w ) and append (a )
|
Overload | Description |
---|---|
close(file: @File) -> () |
Closes the handle of the file. You can reuse the handle by using the open function
|
Overload | Description |
---|---|
exists(file: @File) -> Bool |
returns true if the file exists in the file system
|
Overload | Description |
---|---|
delete(file: @File) -> Bool |
Remove file and return true if it succeeded. You can reuse the handle by using the open function
|
Overload | Description |
---|---|
read_str(file: @File) -> String |
Read the contents of file as a String
|
Overload | Description |
---|---|
read_bytes(file: @File) -> Array<Int> |
Read the contents of file as an Array of bytes
|
read_bytes(file: @File, n: Int) -> Array<Int> |
Read n bytes from file
|
Overload | Description |
---|---|
write_str(file: @File, str: &String) -> Bool |
Write the contents of str to file and return true if it succeeded
|
Overload | Description |
---|---|
write_bytes(file: @File, bytes: &Array<Int>) -> Bool |
Write the contents of bytes to file and return true if it succeeded
|
Overload | Description |
---|---|
input() -> String |
Asks for user input on console and returns it |
Overload | Description |
---|---|
num_args() -> Int |
Returns the number of arguments received from stdin |
Overload | Description |
---|---|
get_arg(i: Int) -> String |
Returns the i 'th argument received from stdin
|