开发者

how can I delete videos stored in documents folder?

I have stored the videos in the documents folder. the path is

/Users/sridhar/Library/Applicat开发者_JS百科ion Support/iPhone Simulator/User/Applications/EC177E77-8665-485C-93DE-62350FA6D0E7/Documents/air.mp4   

I want to delete the video . How can I do it programmatically.


It should work:

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 
NSString *documentsDirectory = [paths objectAtIndex:0]; 
NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"air.mp4"];
BOOL succeed = [[NSFileManager defaultManager] removeItemAtPath:filePath error:nil];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜