简体   繁体   中英

How to copy contents of a directory into a another directory programmatically in an iPhone app

I have 2 directories which are created programmatically, say DIR1 & DIR2 and DIR1 have some XML files now I need to copy the contents of DIR! into DIR2 without giving the Contents name

is this possible?

You can use - (BOOL)copyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error method to copy. Refer this link. It will help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM