Just downloaded SD_ZipLibrary because I thought it would be simpler then ArchiverPlus.
I even checked permissions and the file to unzip (which I've created in B4J using ArchiverPlus) does indeed exist.
The routine (below) runs nicely, but nothing is unzipped and there is not even an error message.
WHY?
Your help is greatly appreaciated, thanks in advance,
john m
_________________________________________________________________________________________________________
Log RESULT:
--> Sub UNZIP...
File help02_en.zip EXISTS!
1 files in /storage/emulated/0/Android/data/vita.nux/files/Temp
unzipping AssetsDir / help02_en.zip
tempPath = /storage/emulated/0/Android/data/vita.nux/files/Temp
1 files in TempPath (true)
tempPath = /storage/emulated/0/Android/data/vita.nux/files/Temp
0 files in TempPath (false)
done unzipping (1) help02_en.zip >> /storage/emulated/0/Android/data/vita.nux/files/Temp
I even checked permissions and the file to unzip (which I've created in B4J using ArchiverPlus) does indeed exist.
The routine (below) runs nicely, but nothing is unzipped and there is not even an error message.
WHY?
Your help is greatly appreaciated, thanks in advance,
john m
_________________________________________________________________________________________________________
Log RESULT:
--> Sub UNZIP...
File help02_en.zip EXISTS!
1 files in /storage/emulated/0/Android/data/vita.nux/files/Temp
unzipping AssetsDir / help02_en.zip
tempPath = /storage/emulated/0/Android/data/vita.nux/files/Temp
1 files in TempPath (true)
tempPath = /storage/emulated/0/Android/data/vita.nux/files/Temp
0 files in TempPath (false)
done unzipping (1) help02_en.zip >> /storage/emulated/0/Android/data/vita.nux/files/Temp
Sub Unzip:
Sub unzip(iPath As String, ifile As String)
TestIt 'to test writeability
Log("unzipping "&iPath&" / "&ifile)
clearTemp(True)
Wait for clearTemp_complete
didZip = 0
Dim UZ As SD_ZipLibrary
UZ.Initialize(Me,"UZ")
Try
UZ.unZip(File.Combine(iPath,ifile),Starter.TempPath) 'File.Combine(File.DirRootExternal,DestinationPath))
didZip = 1
Catch
didZip = -1
Log("Unzip Error of "&ifile&" in "&iPath)
End Try
clearTemp(False)
Wait for clearTemp_complete
Log(" done unzipping ("&didZip&") "&ifile&" >> "&Starter.TempPath)
CallSubDelayed(Me,"unzip_complete")
End Sub
Sub clearTemp(ihow As Boolean)
If tempList.IsInitialized = False Then tempList.initialize
Log("tempPath = "&Starter.TempPath)
tempList = File.ListFiles(Starter.TempPath)
If ihow = True Then 'delete all
For i = 0 To tempList.Size-1
File.delete(Starter.TempPath,tempList.Get(i))
Next
End If
Log(tempList.Size&" files in TempPath ("&ihow&")")
CallSubDelayed(Me,"clearTemp_complete")
End Sub
Sub TestIt
File.Copy(File.DirAssets,"nux_09b.db",Starter.TempPath,"nux_09b.db")
If tempList.IsInitialized = False Then tempList.initialize
tempList = File.ListFiles(Starter.TempPath)
Log(tempList.Size&" files in "&Starter.TempPath)
End Sub