Skip to content

Commit

Permalink
[ci skip] Add note to downloadTask
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jun 10, 2018
1 parent 4bed36c commit 394436a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/NSURLSession+Promise.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ extension URLSession {
}

/// - Remark: we force a `to` parameter because Apple deletes the downloaded file immediately after the underyling completion handler returns.
/// - Note: we do not create the destination directory for you, because we move the file with FileManager.moveItem which changes it behavior depending on the directory status of the URL you provide. So create your own directory first!
public func downloadTask(_: PMKNamespacer, with convertible: URLRequestConvertible, to saveLocation: URL) -> Promise<(saveLocation: URL, response: URLResponse)> {
return Promise { seal in
downloadTask(with: convertible.pmkRequest, completionHandler: { tmp, rsp, err in
Expand Down

0 comments on commit 394436a

Please sign in to comment.