B4X:
Dim TRIP1 As String = "1234567890"
Dim TRIP2 As String = "abcdefghij"
Dim TRIP3 As String = "123 456 789"
Dim TRIP4 As String = "abc abc abc"
Dim FILE_SIZE As Double
Dim text As String
File.OpenOutput (File.DirInternalCache, "MyFile.txt", True) <<<<------- APPEND FEATURE ON
File.WriteString(File.DirInternalCache, "MyFile.txt", TRIP1)
text = File.ReadString(File.DirInternalCache, "MyFile.txt")
Log("text1 " & text)
File.WriteString(File.DirInternalCache, "MyFile.txt", TRIP2)
text = File.ReadString(File.DirInternalCache, "MyFile.txt")
Log("text2 " & text)
File.WriteString(File.DirInternalCache, "MyFile.txt", TRIP3)
text = File.ReadString(File.DirInternalCache, "MyFile.txt")
Log("text3 " & text)
File.WriteString(File.DirInternalCache, "MyFile.txt", TRIP4)
text = File.ReadString(File.DirInternalCache, "MyFile.txt")
Log("text4 " & text)
FILE_SIZE = File.Size(File.DirInternalCache, "MyFile.txt")
Log("_______________________________file size " & FILE_SIZE)
This is a small example. The real case is that I am receiving 1000 strings (1,2KBytes each) and I need to
save the whole thing in one file, MyFile.txt, using Append feature which doesn't work. What can I do?
Thanx a lot.