You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/NSURLSession+Promise.swift
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,7 @@ extension URLSession {
92
92
}
93
93
94
94
/// - 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!
95
96
publicfunc downloadTask(_:PMKNamespacer, with convertible:URLRequestConvertible, to saveLocation:URL)->Promise<(saveLocation:URL, response:URLResponse)>{
96
97
returnPromise{ seal in
97
98
downloadTask(with: convertible.pmkRequest, completionHandler:{ tmp, rsp, err in
0 commit comments