The NSFileManager class enables you to perform various generic file-system operations and insulates an application from the underlying file system.
An apple class reference.
A simple file handling
//Gives you document folder detail
NSFileManager *fileManager = [NSFileManager defaultManager];
[fileManager setDelegate:self];
NSError *error;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSArray *newfilelist=[fileManager contentsOfDirectoryAtPath:documentsDirectory error:&error ];
//gives your file is file or directory
NSString *path = @"/Users";
NSFileManager *fileManager = [NSFileManager defaultManager];
NSLog(@"fileManager=%@", fileManager);
BOOL bDirectory;
BOOL bExists = [fileManager fileExistsAtPath:path isDirectory:&bDirectory];
NSLog(@"%@: bExists=%d bDirectory=%d", path, bExists, bDirectory);