1

To make the app smaller, I want to download specific big files by the user.

Want to check whether the file in the directory, if not, download it (show the progress for the user) and copy it to the specified directory. How do I implement it correctly?

CharlesB
  • 86,532
  • 28
  • 194
  • 218
Astraport
  • 1,239
  • 4
  • 20
  • 40

2 Answers2

2

The File class should work.

var fileToCheck:File=File.applicationStorageDirectory.resolvePath("some-file.txt");
if(!fileToCheck.exists) {
    //download file
}

Downloading a file from AIR is another question, which has already been answered here: Download a file with Adobe AIR

Community
  • 1
  • 1
Pranav Hosangadi
  • 23,755
  • 7
  • 44
  • 70
0

Have a look at Android's DownloadManager class.

Tony the Pony
  • 40,327
  • 71
  • 187
  • 281