Name: open
Syntax:(open
fname mode)
Description:Opens the filename for one of three modes of input or output.
Mode |
Meaning |
"a" |
Append to an existing file or create a new one if one doesn't exist |
"r" |
Open the file for read only. |
"w" |
Open the file for write and if the file exists then replace it. |
Example(s):(open "test.txt" "r")
(open "support/test.txt" "r")