Reputation: 173
In an app, I need to download html pages (along with css, images and js files) from server to the FileSystemStorage
and then display it on device. With Util.downloadUrlToFile
I can download the files individually but is there any way to download the entire folder to device?
Upvotes: 2
Views: 53
Reputation: 52770
No, since there is no such concept of a directory in HTTP. You can download a file but you won't know there are other files next to it. One of the things apps do is parse the HTML/CSS to find other referenced files and download them. That's a HUGE pain.
Another option is to zip or tar the files together and unzip them locally.
Upvotes: 1