The NSFileManager class enables you to perform various generic file-system operations and insulates an application from the underlying file system.
How is it possible? let exists = NSFileManager.defaultManager().fileExistsAtPath(path.absoluteString) print("exists: \(exists)") //false This is path.absoluteString //file:///…
ios swift nsfilemanageri am using the code below to save an image in the NSDocumentDirectory -(BOOL)saveImage:(UIImage *)image name:(NSString *)…
iphone nsfilemanager nsdocumentdirectoryI am trying to write a simple log file for each execution of my app. The logfile name is based …
ios objective-c nsfilemanager createfilelet data = "InPractiseThisWillBeAReheallyLongString" createDir() let docsDir = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first! let ourDir = docsDir.appendingPathComponent("ourCustomDir/") let …
ios swift zip nsfilemanager ssziparchive- (void)viewDidLoad { [super viewDidLoad]; if ([[NSFileManager defaultManager] fileExistsAtPath:pathString]) { infoDict = [[NSMutableDictionary alloc] initWithContentsOfFile:pathString]; } else { infoDict = [[NSMutableDictionary alloc]initWithObjects:[…
iphone ios nsmutabledictionary nsfilemanagerI have a file named Data.plist in my main bundle (at the root of the app directory), and I …
ios swift3 nsfilemanager copy-itemI try to call the fileManager.createFileAtPath-method, but it always fails. My variable success is always false. I looked at …
ios swift nsfilemanagerI am recording sound file in one of my apps. I am trying to figure out how to get the …
ios nsfilemanagerI have a NSURL object. It has address of a filesystem element, it is either a file or a directory. …
objective-c file directory nsurl nsfilemanagerWhen I try to create a folder using the code bellow it returns NO with an error when I try …
ios directory nsfilemanager create-directory