#import <Foundation/Foundation.h>

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];


	NSString *path, *text;
	NSError *error;
	
	path =[[@"~" stringByExpandingTildeInPath]
					 stringByAppendingString:@"/sample.txt"];
	text =[NSString stringWithContentsOfFile:path
					encoding:NSUTF8StringEncoding
					error:&error];
	
	if (text == nil) {
		NSLog(@"Error:%@", [error localizedDescription]);
	} else {
		NSLog(@"\n%@", text);
	}
	
    [pool drain];
    return 0;
}
