I have this code who get a file inside my iOS, convert it to an NSData and converts it into a NSString:
NSFileManager *filemgr;
filemgr = [NSFileManager defaultManager];
NSData *files = [filemgr contentsAtPath:databasePath];
NSData *databuffer = [filemgr contentsAtPath:databasePath];
NSString *string = [NSString stringWithFormat:@"%@",databuffer];
All I wanna know is if there is the possibility to convert this NSString to NSData and back through the NSData using NSFileManager and resave the file in its original format?