for text file (*.txt)read:
file = File.open("filedir","r")
contents = file.read
file.close
write at end of file:
my_string = "oh my god"# only string allowed
file = File.open("filedir","a")
file.write(my_string)
file.close
overwrite:
my_string = "oh my god"
file = File.open("filedir","wb")
file.write(my_string)
file.close
for rpg maker xp file(*.rxdata)save
var = "cuckoo"# can be array, number,....
file = File.open("filedir","a")# replace "a" with "wb" for overwrite
Marshal.dump(var, file)
file.close
load
file = File.open("filedir","r")
var = Marshal.load(file)
file.close