Instance Method

setDestination:allowOverwrite:

Sets the destination path of the downloaded file.

Declaration

- (void)setDestination:(NSString *)path allowOverwrite:(BOOL)allowOverwrite;

Parameters

path

The path for the downloaded file.

allowOverwrite

YES if an existing file at path can be replaced, NO otherwise.

Discussion

If allowOverwrite is NO 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 the download:didCreateDestination: delegate method to determine the filename used when the file is written to disk.

Special Considerations

An NSURLDownload instance ignores multiple calls to this method.

See Also

Creating and configuring a download instance

- initWithRequest:delegate:

Returns an initialized URL download for a URL request and begins to download the data for the request.

Deprecated