Just like what Spiff59 has said, FileOpen does nothing to the file content. What it does is creates a "handle". Here are some examples:
1. Read, Change, Save
; read data
$data = FileRead("xxx.txt"); you can use FileOpen, if you want to.
;~ $file = FileOpen("xxx.txt",0)
;~ $data = FileRead($file)
;~ FileClose($file)
$data = StringReplace($data,"b",""); Replace 'b' with empty string a.k.a delete char 'b'
;open file in erase previos data mode
$file = FileOpen("xxx.txt",2)
FileWrite($file,$data)
FileClose($file)
xxx.txt, before
aaa
bbb
ccc
xxx.txt, after
aaa
ccc
2. Save, append to end of file
$file = FileOpen("xxx.txt",1)
FileWrite($file,"ddd")
FileClose($file)
or simply
FileWrite("xxx.txt","ddd")
"xxx.txt" - before
aaa
bbb
ccc
"xxx.txt" - after
aaa
bbb
cccddd