This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var writeTextToFile = function(text, filePath) { | |
var t = [NSString stringWithFormat:@"%@", text], | |
f = [NSString stringWithFormat:@"%@", filePath]; | |
return [t writeToFile:f atomically:true encoding:NSUTF8StringEncoding error:nil]; | |
} | |
var readTextFromFile = function(filePath) { | |
var fileManager = [NSFileManager defaultManager]; | |
if([fileManager fileExistsAtPath:filePath]) { | |
return [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; |