• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Downloading a file from another mac
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Downloading a file from another mac


  • Subject: Downloading a file from another mac
  • From: "Sandeep P. Deshpande" <email@hidden>
  • Date: Fri, 13 Feb 2004 21:20:35 +0530
  • Thread-topic: Downloading a file from another mac

Hi,

I want to download a file from another mac on to my mac machine through
Objective-C code. I tried the following but it did not work. Neither, it
threw any error nor it downloaded the file.



+(void)downloadTheFile

{

NSURL* theURL = [[NSURL alloc] initWithScheme:@"ftp"
host:@"username:password@Host_IP" path:@"/Users/username/Test.rtf"];

NSURLRequest* theRequest = [NSURLRequest requestWithURL:
theURL];

NSURLDownload* theDownload = [[NSURLDownload alloc]
initWithRequest:theRequest delegate:self];

if (theDownload)

{

[theDownload
setDestination:@"/Users/myusername" allowOverwrite:YES];

}

else

{

NSLog(@"The file could not be
downloaded.");

}

}



When I run this code through debugger, the statement of setting the
destination is also executed but nothing has been downloaded on my
machine. I do not get any error message on screen or run log.



I also tried to use the delegate methods of NSURLDownload to see if the
control is going there. I tried following, but this message was not
present in run log (i.e. control never went here).

-(void)download:-(NSURLDownload*)download
didFailWithError:-(NSError*)error

{

NSLog("Download failure");

}



Please help....



Thanks,

Sandeep



PS: I am using Mac OS 10.3.
_______________________________________________
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.

  • Prev by Date: Re: What init declaration class needs?
  • Next by Date: How to draw hairline ?
  • Previous by thread: Re: What init declaration class needs?
  • Next by thread: How to draw hairline ?
  • Index(es):
    • Date
    • Thread