Skip to content

Commit 394436a

Browse files
committed
[ci skip] Add note to downloadTask
1 parent 4bed36c commit 394436a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/NSURLSession+Promise.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ extension URLSession {
9292
}
9393

9494
/// - Remark: we force a `to` parameter because Apple deletes the downloaded file immediately after the underyling completion handler returns.
95+
/// - 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!
9596
public func downloadTask(_: PMKNamespacer, with convertible: URLRequestConvertible, to saveLocation: URL) -> Promise<(saveLocation: URL, response: URLResponse)> {
9697
return Promise { seal in
9798
downloadTask(with: convertible.pmkRequest, completionHandler: { tmp, rsp, err in

0 commit comments

Comments
 (0)