Le 6 nov. 08 à 15:02, Arnab Ganguly a écrit :

Hi All,
My requirement is to download the html file in my machine.I am trying to execute the below code,it gets executed correctly but when I go to the /tmp dir I don't see any file getting downloaded.Any help would be very much
appreciated.

NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@
"http://www.videolan.org/vlc/download-sources.html";]

                  cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:60.0];


NSURLDownload  *theDownload=[[NSURLDownload alloc]
initWithRequest:theRequest delegate:self];
if (theDownload)
{
                           [theDownload setDestination:@"/tmp"
allowOverwrite:YES];
}

Thanks and regards
Arnab
_____


IIRC setDestination:allowOverwrite: expect a file path, not a directory one.

Note that you should also read the "Temporary Files" section of the "Where to put application Files" guide to know why this is a bad idea to use /tmp

http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/Articles/WhereToPutFiles.html


_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to