Class FileDownloadManager
Use to download files (e.g. models) from the internet
public class FileDownloadManager
- Inheritance
-
FileDownloadManager
- Inherited Members
Constructors
FileDownloadManager()
Create a file download manager
public FileDownloadManager()
Properties
AllFilesDownloaded
Return true if all files has been downloaded and are valid.
public bool AllFilesDownloaded { get; }
Property Value
Files
Get the files that will be downloaded by this download manager.
public DownloadableFile[] Files { get; }
Property Value
Methods
AddFile(DownloadableFile)
Add a file to download
public void AddFile(DownloadableFile downloadableFile)
Parameters
downloadableFile
DownloadableFileThe file to be downloaded
AddFile(string, string, string)
Add a file to download
public void AddFile(string url, string localSubfolder, string sha256Hash = null)
Parameters
url
stringThe url of the file to be downloaded
localSubfolder
stringThe local subfolder name to download the model to.
sha256Hash
stringThe sha256 hash value for the file
Clear()
Clear the list of files
public void Clear()
Download(int)
Download the files.
public Task Download(int retry = 1)
Parameters
retry
intThe number of retries.
Returns
- Task
The async Task
Events
OnDownloadProgressChanged
This event will be fired when the download progress is changed
public event FileDownloadManager.DownloadProgressChangedEventHandler OnDownloadProgressChanged