Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSURLDownloadMBS class.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSURLDownloadMBS.Constructor(request as NSURLRequestMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
request: The URL request to download. The request object is deep-copied as part of the initialization process. Changes made to request after this method returns do not affect the request that is used for the loading process.
On success the handle property is not zero.
See also:
NSURLDownloadMBS.Constructor(resumeData as Memoryblock, path as folderitem)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
resumeData: Specifies the data to resume downloading.
path: The location for the downloaded data.
On success the handle property is not zero.
See also:
NSURLDownloadMBS.Constructor(resumeData as Memoryblock, path as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
resumeData: Specifies the data to resume downloading.
path: The location for the downloaded data.
On success the handle property is not zero.
See also:
NSURLDownloadMBS.deletesFileUponFailure as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Networking | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
True if partially downloaded files should be deleted when a download stops prematurely, false otherwise. The default is true.
(Read and Write computed property)
Some examples using this property:
NSURLDownloadMBS.request as NSURLRequestMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSURLDownloadMBS.resumeData as Memoryblock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
The resume data for a download that is not yet complete. This data represents the necessary state information that an NSURLDownload object needs to resume a download. The resume data can later be used when initializing a download with Constructor. Returns nil if the download is not able to be resumed.
Resume data will only be returned if the protocol of the download as well as the server support resuming. In order to later resume a download you must call setDeletesFileUponFailure passing false so the partially downloaded data is not deleted when the initial connection is lost or canceled.
Some examples using this method:
NSURLDownloadMBS.setDestination(path as folderitem, allowOverwrite as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
path: The path for the downloaded file.
allowOverwrite: true if an existing file at path can be replaced, false otherwise.
If allowOverwrite is false and a file already exists at path, a unique filename will be created for the downloaded file by appending a number to the filename. The delegate can implement didCreateDestination to determine the filename used when the file is written to disk.
An NSURLDownload instance ignores multiple calls to this method.
See also:
NSURLDownloadMBS.setDestination(path as string, allowOverwrite as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
path: The path for the downloaded file.
allowOverwrite: true if an existing file at path can be replaced, false otherwise.
If allowOverwrite is false and a file already exists at path, a unique filename will be created for the downloaded file by appending a number to the filename. The delegate can implement didCreateDestination to determine the filename used when the file is written to disk.
An NSURLDownload instance ignores multiple calls to this method.
See also:
The items on this page are in the following plugins: MBS MacBase Plugin.