NString *newDirectoryName = @"<new folder name>"; NSString *oldPath = @"<path to the old folder>"; NSString *newPath = [[oldPath stringByDeletingLastPathComponent] stringByAppendingPathComponent:newDirectoryName]; NSError *error = nil; [[NSFileManager defaultManager] moveItemAtPath:oldPath toPath:newPath error:&error]; if (error) { NSLog(@"%@",error.localizedDescription); // handle error }
Here you can find all the real time issues we faced while developing iPhone, android applications
Friday, 21 June 2013
How to rename the file in document directory(Sand box)without losing of data in file?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment