PDA

View Full Version : can't read from file




serbov
Jul 22, 2008, 04:36 AM
I have some code:

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *path = [documentsDirectory stringByAppendingPathComponent:@"example.txt"];

NSString reValS;
NSInteger retVal;
retVal = [@"2" writeToFile: path atomically:YES];


it's write to file value =2 ; but I can't find anywhere - how can I read this value to reValS?

thanks!



serbov
Jul 22, 2008, 08:37 AM
someboby know?