Re: How to download a file from a web site?
Re: How to download a file from a web site?
- Subject: Re: How to download a file from a web site?
- From: David Blanton <email@hidden>
- Date: Tue, 01 Apr 2003 10:34:15 -0700
On 4/1/03 3:15 AM, "Lorenzo Puleo" <email@hidden> wrote:
>
How to download a file SIT from a web site using Cocoa?
>
Also it should be fine to show a progress bar reporting the status of
>
downloading and a Cancel button.
>
Is there any sample code somewhere?
>
>
Best Regards
NSURL * aURL = [[NSURL alloc]initWithString:@"
http://name.net/file.sit"];
NSData *theData = [NSData dataWithContentsOfURL:aURL];
unsigned int theDataLength = [theData length];
if(theDataLength)
{
unsigned char userBuffer[theDataLength];
[theData getBytes:userBuffer];
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.