Description: appends text to a text file ?
Author: @Erel (original code here)
Platforms: B4A, B4J, B4i
Author: @Erel (original code here)
Platforms: B4A, B4J, B4i
AppendToTextFile:
Private Sub AppendToTextFile(Dir As String, FileName As String, Text As String, NewLine As Boolean)
If NewLine Then
Text = CRLF & Text
End If
Dim out As OutputStream = File.OpenOutput(Dir, FileName, True)
Dim b() As Byte = Text.GetBytes("utf8")
out.WriteBytes(b, 0, b.Length)
out.Close
End Sub