Today i'm playing with files but i have a question maybe someone can help.
Acording File.OpenOutput if i set Append to True i will add new data at the end of the file
but the code bellow deletes the previous data
In booklets i'm reading
So it creates a new file with same name? And what about appending?
Thank you all
File.OpenOutput (Dir As String, FileName As String, Append As Boolean)
- Opens the given file for output, the Append parameter tells whether the text will be added at the
end of the existing file or not. If the file doesn't exist it will be created.
Acording File.OpenOutput if i set Append to True i will add new data at the end of the file
but the code bellow deletes the previous data
B4X:
File.OpenOutput(strFolder, fn, True)
Private msg As String = "Hello World 2"
File.WriteString(strFolder, fn, msg)
Private msg As String = "Hello World 3"
File.WriteString(strFolder, fn, msg)
In booklets i'm reading
File.WriteString (Dir As String, FileName As String, Text As String)
- Writes the given text to a new file.
So it creates a new file with same name? And what about appending?
Thank you all