Re: How to specify Volume to NSURLSession ?

2015-09-29 Thread Mike Abdullah

> On 29 Sep 2015, at 10:25, dangerwillrobinsondan...@gmail.com wrote:
> 
> That is to say use the data task delegate methods to receive data and write 
> it where you want it?

Yep, fire up a data task (with delegate, not completion handler). Use 
-URLSession:dataTask:didReceiveResponse:completionHandler: to open up a stream 
or similar somewhere suitable on disk, and write to it in 
-URLSession:dataTask:didReceiveData:
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How to specify Volume to NSURLSession ?

2015-09-29 Thread dangerwillrobinsondanger
That is to say use the data task delegate methods to receive data and write it 
where you want it?

Sent from my iPhone

> On Sep 29, 2015, at 5:39 PM, Mike Abdullah  wrote:
> 
> 
>> On 29 Sep 2015, at 07:02, Gerriet M. Denkmann  wrote:
>> 
>> When I download a file using NSURLSession downloadTaskWithRequest the file 
>> ends up in exactly the wrong volume.
>> Which means: I have to copy it to the right one, which, for really big 
>> files, can take some non-trivial time.
>> 
>> Is it possible to advise NSURLSession which volume to use?
> 
> To my knowledge, it’s not possible, and would make an excellent feature 
> request.
> 
> I think you would implement something similar yourself at present by using a 
> streamed task, and writing the data to disk yourself.
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/dangerwillrobinsondanger%40gmail.com
> 
> This email sent to dangerwillrobinsondan...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How to specify Volume to NSURLSession ?

2015-09-29 Thread Mike Abdullah

> On 29 Sep 2015, at 07:02, Gerriet M. Denkmann  wrote:
> 
> When I download a file using NSURLSession downloadTaskWithRequest the file 
> ends up in exactly the wrong volume.
> Which means: I have to copy it to the right one, which, for really big files, 
> can take some non-trivial time.
> 
> Is it possible to advise NSURLSession which volume to use?

To my knowledge, it’s not possible, and would make an excellent feature request.

I think you would implement something similar yourself at present by using a 
streamed task, and writing the data to disk yourself.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

How to specify Volume to NSURLSession ?

2015-09-28 Thread Gerriet M. Denkmann
When I download a file using NSURLSession downloadTaskWithRequest the file ends 
up in exactly the wrong volume.
Which means: I have to copy it to the right one, which, for really big files, 
can take some non-trivial time.

Is it possible to advise NSURLSession which volume to use?

Gerriet.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com