0
, что предполагают, чтобы быть неправильно здесь с моим кодом:записи NSMutableString в файл
-(void)writetofile:(NSMutableString *)str{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask, YES);
NSString *path = [paths objectAtIndex:0];
NSString *filePath = [NSString stringWithFormat:@"%@/code.txt",path];
NSStringEncoding *encode=NULL;
[str writeToFile:filePath atomically:YES encoding:*encode error:nil];
}