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 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 Can i execute adb commands via B4A? - Alhootti (first post)    Sep 19, 2024 Thanks @Erel it is working now perfectly File.WriteString(File.DirInternalCache, "command", "modprobe cifs" & CRLF & "modprobe aufs" & CRLF & "date 102902012020.55" & CRLF & "exit") 'Any commands via crlf, and exit at end 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 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 B4J Question losing character when using File.WriteString - William Lancee (first post)    Feb 09, 2022   (1 reaction) The backslash indicates that the next character should treated "as is" (not as a special character).
This is called escaping. If you want to keep the slash, then escape that by doubling it.
You'll still have to escape the quotes.
"key": "value<br><font size =\\\"1\\\">value</font>" B4A Question Passing a file to another app - gezueb (first post)    Nov 03, 2020 Thats weird: If my code contains:
File.WriteString(File.DirDefaultExternal,"FENString.txt",FENString2)
the permission in the create_activity works and I am asked if I do permit.
But if the code contains:
File.WriteString("/","FENString.txt",FENString2) 'permission denied
I will not get any 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 Question Port number 20 or 21 for successful Upload to FTP server - KMatle (first post)    Nov 18, 2016   (1 reaction) File.WriteString(File.DirRootExternal
If File.Exists(File.DirRootExternal...
vs.
ibFTP.UploadFile(File.DirDefaultExternal
It's not the same directoy! Page: 1   2   3   4   5   6   7   Powered by ColBERT |