B4A Question Explaining text files - ilan (first post)    Mar 20, 2021   (1 reaction) maybe something like this:
File.WriteString(File.DirApp,"test.txt","this is the first line")
'....'
Dim sb As StringBuilder
sb.Initialize
sb.Append(File.ReadString(File.DirApp,"test.txt")).Append(CRLF).Append("this is the second line")
File.WriteString(File.DirApp,"t B4A Question Saving a variable in memory - inakigarm (first post)    Sep 28, 2016   (2 reactions) Most simplest example: (from B4A IDE info) Write it: File.WriteString(File.DirRootExternal, "1.txt", "Some text") Read it: Dim text As String text = File.ReadString(File.DirRootExternal, "1.txt") See File object for more options B4A Library [B4X] CSVParser - CSV parser and generator - Erel    Jun 29, 2020   (33 reactions) CSV - comma separated values format. The various StringUtils libraries include methods for loading and saving CSV files. However these methods have a few drawbacks: - They work with files instead of strings. This is especially problematic if the input is not UTF8 encoded. - As they are implemente B4A Question {Closed] GetBytes problem - Erel (first post)    Aug 11, 2021   (1 reaction) String.GetBytes -> returns the bytes representing the string. File.ReadBytes -> reads the file and return its raw content. Practically: File.WriteString(s) 'same as File.WriteBytes(s.GetBytes("utf8")) Dim b() As Byte = s.GetBytes("utf8") 'same as b = File.ReadBytes("file that we previously wrote" B4i Question files internal ios - aminoacid (first post)    Sep 15, 2022   (1 reaction) I suggest using "xui.DefaultFolder" and File.ReadString, File.WriteString, etc. especially if you are writing a cross-platform application. Example: xui.SetDataFolder("YourFolderName") File.WriteString(xui.DefaultFolder,"filename","string") B4A Question Simple PGP - GERSON PINTO    Jun 17, 2019 Sub btnCrypt_Click File.WriteString(File.DirRootExternal, "clear.txt", txt1.Text) File.WriteString(File.DirRootExternal, "crip.txt", "criptografado") Dim out As OutputStream = File.OpenOutput(File.DirRootExternal, "crip.txt", False) Dim pk As InputStream = File.OpenInput(File.Di B4A Question How can to set the date and time the Android system? - rtek1000 (first post)    Sep 18, 2015   (2 reactions) Combine(File.DirInternalCache, "command") File.WriteString(File.DirInternalCache, "runner", "su < " & Command) File.WriteString(File.DirInternalCache, "command", Command_in & CRLF & "exit") 'Any commands via crlf, and exit at end StdOut.Initialize StdErr.Initialize Result B4A Question File.WriteString Problem - wdegler    Mar 10, 2016 To anyone with an explanation:
I clicked on Help/Online Help, selected File/WriteString and copied the example:
File.WriteString(File.DirRootExternal, "1.txt", "Some text")
into a program as the first statement after the LoadLayout line.
I then set a breakpoint on the line after that. After French JSInterface - klaus (first post)    Aug 29, 2020 Au lieu de:
File.WriteString(File.DirRootExternal,"toi1.txt",html)'sauvegarde le fichier issue de web1 sur toi1.php.htm
Essaies:
Dim rs As RuntimePermissions
Dim MonDossier As String
MonDossier = rs.GetSafeDirDefaultExternal("")
File.WriteString(MonDossier,"toi1.txt",html)
Log(MonDossier) âffich B4A Tutorial Uncaught Exceptions - Erel (first post)    Apr 24, 2017   (3 reactions) File.WriteString overwrites the existing file. It doesn't append anything.
If you want to append then open an OutputStream with Append parameter set to True and then use TextWriter to write the data. Don't forget to close it. Page: 1   2   3   4   5   6   7   Powered by ColBERT |