Hi,
My app does something similar to code below. It downloads files and plays file with no problem. Then I decided to delete the Song Folder in the installation path and then try to redownload.
At this point the app doesnt download the file any more. It makes the Song Dir. but does not download the file.
Any ideas other than dont delete the folder. I am deleting incase user mistakenly deletes folder. I want my app to know that the needed files are gone and then the app redownloads
Thanks
Sub Button_Click
If File.Exists(File.DirRootExternal, "Song/1.mp3") = False Then
File.MakeDir(File.DirRootExternal, "/Song/")
req.InitializeGet("http://mypodcast.com/Song/Happy.zip")
hc.Execute(req, 1)
End If
End sub
Sub hc_ResponseSuccess(Response As HttpResponse, TaskId As Int)
If File.Exists(File.DirRootExternal,"Song/1.mp3") = False Then
Response.GetAsynchronously("FileSample", File.OpenOutput(File.DirRootExternal,"Song/Happy.zip", False), True, TaskId)
End If
End Sub
Sub FileSample_StreamFinish(Success As Boolean, TaskId As Int)
If File.Exists(File.DirRootExternal, "Song/Happy.zip") = True Then
Arc.Unzip(File.DirRootExternal,"/Song/Happy.zip",File.DirRootExternal & "//Song/Cool","")
End If
Delete
End sub
Sub Delete
If File.Exists(File.DirRootExternal, "Song/Happy.zip") = True Then
File.delete(File.DirRootExternal, "/Song/Happy.zip")
End If
End Sub
My app does something similar to code below. It downloads files and plays file with no problem. Then I decided to delete the Song Folder in the installation path and then try to redownload.
At this point the app doesnt download the file any more. It makes the Song Dir. but does not download the file.
Any ideas other than dont delete the folder. I am deleting incase user mistakenly deletes folder. I want my app to know that the needed files are gone and then the app redownloads
Thanks
Sub Button_Click
If File.Exists(File.DirRootExternal, "Song/1.mp3") = False Then
File.MakeDir(File.DirRootExternal, "/Song/")
req.InitializeGet("http://mypodcast.com/Song/Happy.zip")
hc.Execute(req, 1)
End If
End sub
Sub hc_ResponseSuccess(Response As HttpResponse, TaskId As Int)
If File.Exists(File.DirRootExternal,"Song/1.mp3") = False Then
Response.GetAsynchronously("FileSample", File.OpenOutput(File.DirRootExternal,"Song/Happy.zip", False), True, TaskId)
End If
End Sub
Sub FileSample_StreamFinish(Success As Boolean, TaskId As Int)
If File.Exists(File.DirRootExternal, "Song/Happy.zip") = True Then
Arc.Unzip(File.DirRootExternal,"/Song/Happy.zip",File.DirRootExternal & "//Song/Cool","")
End If
Delete
End sub
Sub Delete
If File.Exists(File.DirRootExternal, "Song/Happy.zip") = True Then
File.delete(File.DirRootExternal, "/Song/Happy.zip")
End If
End Sub