How to install read write files

rls456

Member
Licensed User
Longtime User
How do you install several read write files into seperate folder when the application is installed.

Thanks
 

kickaha

Well-Known Member
Licensed User
Longtime User
Here is a snippet of code from one of my programs.

I have the files in a zip file so that the directory structure is maintained.

B4X:
   Dim Writer As TextWriter
   Dim Reader As TextReader 
   
   If Not (File.IsDirectory (File.DirInternal , "rounds")) Then 
      Dim MyZip As ABZipUnzip 
      File.Copy (File.DirAssets, "files.zip", File.DirInternalCache, "files.zip")
      MyZip.ABUnzip ( File.DirInternalCache &"/files.zip", File.DirInternal)
   End If
 
Upvote 0

mistermentality

Active Member
Licensed User
Longtime User
You can use the File commands to write to external storage, you can then write to these or read from them from within your app.

This requires the user to have say a memory card, although I think it is possible to also write to and from the apps location on your devices memory though that could potentially use up a lot of memory if the files were large.

Dave
 
Upvote 0
Top