gjoisa Active Member Licensed User Longtime User Jul 10, 2021 #1 how to write a string file(or some other) with external storage lib ? like this File.WriteString(File.DirDefaultExternal,"xyz.txt","SomeText") ?
how to write a string file(or some other) with external storage lib ? like this File.WriteString(File.DirDefaultExternal,"xyz.txt","SomeText") ?
M MikeSW17 Active Member Licensed User Longtime User Jul 10, 2021 #2 TextWriter? https://www.b4x.com/guides/B4XBasicLanguage/?page=117 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 11, 2021 #3 Or: B4X: Dim s As String = "..." Dim b() As Byte = s.GetBytes("utf8") Dim out As OutputStream = Storage.OpenOutputStream(f) out.Write(b, 0, b.Length) out.Close Upvote 0
Or: B4X: Dim s As String = "..." Dim b() As Byte = s.GetBytes("utf8") Dim out As OutputStream = Storage.OpenOutputStream(f) out.Write(b, 0, b.Length) out.Close