(in B4XMainPage)
BookletCalls.Storage.Initialize (Me, "Storage")
.....
(in B4XMainPage)
BookletCalls.Storage.SelectDir(True)
Wait For Storage_ExternalFolderAvailable
.....
(Module Called BookletCalls)
Dim ef As ExternalFile
Dim os As OutputStream
Dim is1 As InputStream
ef = Storage.FindFile(Storage.Root, Filename)
If ef.IsInitialized = True Then
Storage.DeleteFile(ef) ' Remove old one if its there
End If
ef = Storage.FindFileOrCreate(Storage.Root, Filename)
os = Storage.OpenOutputStream(ef)
If File.Exists(MTT.FileFolder, Filename) = True Then
is1 = File.OpenInput(MTT.FileFolder, Filename)
File.Copy2(is1, os)
Log("Backup made: " & Filename)
End If
os.Flush
os.Close