如何删除NSDocumentDirectory
使用以下代码保存的数据。
NSArray *paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *fullFileName2 = [NSString stringWithFormat:@"%@nameArray", documentsDirectory];
nameArray=[[NSMutableArray alloc]initWithContentsOfFile:fullFileName2];
[nameArray addObject:nameField.text];
[nameArray writeToFile:fullFileName2 atomically:NO];