Docs · API reference · Motus.Abstractions
IDownload Interface#
Represents a file download initiated by a page.
public interface IDownload
Properties#
SuggestedFilename Property#
Gets the suggested filename for the download.
string SuggestedFilename { get; }
Property Value#
Url Property#
Gets the URL of the download.
string Url { get; }
Property Value#
Methods#
CancelAsync() Method#
Cancels the download.
System.Threading.Tasks.Task CancelAsync();
Returns#
DeleteAsync() Method#
Deletes the downloaded file.
System.Threading.Tasks.Task DeleteAsync();
Returns#
FailureAsync() Method#
Returns the failure reason if the download failed, or null if it succeeded.
System.Threading.Tasks.Task<string?> FailureAsync();
Returns#
System.Threading.Tasks.Task<System.String>
The failure reason, or null.
PathAsync() Method#
Returns the path to the downloaded file once the download completes.
System.Threading.Tasks.Task<string?> PathAsync();
Returns#
System.Threading.Tasks.Task<System.String>
The path to the downloaded file, or null if the download failed.
SaveAsAsync(string) Method#
Saves the download to the specified path.
System.Threading.Tasks.Task SaveAsAsync(string path);
Parameters#
path System.String
The destination file path.