Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

saleh.hi.62

macrumors member
Original poster
Jul 25, 2011
95
0
Hello guys,

Code:
NSString *webpage;
[webPage writeToFile:@"[COLOR="SeaGreen"]/saleh/[/COLOR][COLOR="Red"]http://www.yahoo.com/index.html[/COLOR]"
							atomically:YES encoding:NSUTF8StringEncoding error:&theError];

in this command i am trying to write the content of webpage variable to an HTML file.

Code:
[webPage writeToFile:@"[COLOR="SeaGreen"]/saleh/[/COLOR][COLOR="Red"]http://www.yahoo.com/index.html[/COLOR]"

here /saleh is my path and i must to specify the file name after path.

Problem:
Code:
[COLOR="Red"]http://www.yahoo.com/index.html[/COLOR]
this my url, i would like to save my file with this name after path, but the problem is that, it is not capable of recognizing /http://www.yaHOO.com/index.html that is not a path! but its a file name!

how can i specify that after /saleh/
this string totally is my filename not the path!!!

Code:
[COLOR="Red"]http://www.yahoo.com/index.html[/COLOR]
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.