You need to use NSFileManager
class functionality.
To get Documents directory path:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0]; // Get Documents directory
To check if directory (or file) exists at given path:
- (BOOL)fileExistsAtPath:(NSString *)path
- (BOOL)fileExistsAtPath:(NSString *)path isDirectory:(BOOL *)isDirectory
Remove item at path:
- (BOOL)removeItemAtPath:(NSString *)path error:(NSError **)error
Create directory at path:
- (BOOL)createDirectoryAtPath:(NSString *)path attributes:(NSDictionary *)attributes
For more details on these functions see NSFileManager class reference.