`
zani
  • 浏览: 356466 次
  • 性别: Icon_minigender_1
  • 来自: 福州
社区版块
存档分类
最新评论

copying files from main bundle to documents folder

 
阅读更多
NSArray* resContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:copyItemAtPath:sourcePath error:NULL];
[resContents enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop)
    {
        NSError* error;
        if (![[NSFileManager defaultManager] 
                  copyItemAtPath:[sourcePath stringByAppendingPathComponent:obj] 
                  toPath:[documentsDirectory stringByAppendingPathComponent:obj]
                  error:&error])
            DLogFunction(@"%@", [error localizedDescription]);
    }];

 

NSArray* resContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:copyItemAtPath:sourcePath error:NULL];

for (NSString* obj in resContents){
    NSError* error;
    if (![[NSFileManager defaultManager] 
                 copyItemAtPath:[sourcePath stringByAppendingPathComponent:obj] 
                 toPath:[documentsDirectory stringByAppendingPathComponent:obj]
                 error:&error])
            DLogFunction(@"%@", [error localizedDescription]);
    }

 

分享到:
评论

相关推荐

    Copying Compiler Sections from Flash to RAM on the TMS320F28xxx DSCs (spraau8)

    这篇文档的标题是“Copying Compiler Sections from Flash to RAM on the TMS320F28xxx DSCs (spraau8)”,说明它主要讨论的是如何在德州仪器的TMS320F28xxx数字信号控制器(DSCs)上,将编译时初始化的代码段从闪存...

    Copying Compiler Sections From Flash to RAM on the

    ### 复制编译器部分从闪存到RAM在TMS320F28xxx DSC中的应用 #### 引言 本报告主要探讨如何将初始化的编译器部分从内部闪存复制到TMS320F28xxx数字信号控制器(DSC)的内部随机访问内存(RAM)中,以此来优化执行...

    OutlookAttachView v2.73

    o Changed the user interface of the Main Scan Options window, to make it useable for lower screen resolutions and to give more space to the folders/subjects/from/to include/exclude lists. * ...

    Linux for Beginners: An Introduction to the Linux Operating System

    Listing, reading, creating, editing, copying, and deleting files. Exactly how permissions work and how to decipher the most cryptic Linux permissions with ease. How to use the nano, vi, and emacs ...

    Password Recovery Bundle 2014 Enterprise Edition 3.2-密码找回|重置工具

    - PST Password Recovery - Instantly recover lost or forgotten passwords for Microsoft Outlook 2013 / 2010 / 2007 / 2003 / XP / 2000 / 97 personal folder (.pst) files. - PDF Password Recovery - Recover...

    apktool documentation

    original = META-INF folder / AndroidManifest.xml, which are needed to retain the signature of apks to prevent needing to resign. Used with -c / --copy-original on [b]uild unknown = Files / folders ...

    [MMS_039839]Copying a DINT variable to Ebool array

    在 "[MMS_039839]Copying a DINT variable to Ebool array" 的场景中,我们可能会遇到这样的问题:如何从一个DINT变量中提取并转换成多个EBOOL元素?这通常涉及到位操作,因为一个DINT变量包含32个独立的位,而每个E...

    Java邮件开发Fundamentals of the JavaMail API

    There are many different documents that take effect here: RFC 822 , RFC 2045 , RFC 2046 , and RFC 2047 . As a user of the JavaMail API, you usually don't need to worry about these formats. However,...

    KCFinder(CKEditor的文件管理器) v2.5.1

    01 Ajax engine with JSON responses02 Select multiple files with the Ctrl/Command key03 Download multiple files or a folder as single ZIP file04 Clipboard for copying and moving multiple files05 Easy ...

    KCFinder(CKEditor的文件管理器) v2.32.rar

    01 Ajax engine with JSON responses 02 Select multiple files with the Ctrl/Command key 03 Download multiple files or a folder as single ZIP file 04 Clipboard for copying and moving multiple files 05 ...

    百度云stm32cubemx,MDK,jlinkob驱动.txt

    里面包含stm32cubemx的各需要的文件,众多版本 的MDK,jlink的驱动,是新手学习单片机很需要的一些软件。

    thomas 桌面管理软件

    【Thomas桌面管理软件】是一款专为用户打造的高效桌面管理工具,旨在提升用户的电脑桌面使用体验,通过优化桌面菜单,让工作和生活更加便捷。这款软件以轻量级的特性著称,占用系统资源极小,确保在提高桌面组织效率...

    Advanced.PDF.Password.Recovery.v1.46

    This program (Advanced PDF Password Recovery, or simply APDFPR) can be used to decrypt protected Adobe Acrobat PDF files, which have "owner" password set, preventing the file from editing (changing), ...

    File_实用案例_实现文件拷贝_FileCopy.java

    * static copy() method that other programs can use to copy files. **/ public class FileCopy { /** The main() method of the standalone program. Calls copy(). */ public static void main(String[] ...

    copying.txt

    本篇文章将重点介绍 Dev-C++ 所需的“copying.txt”文件及其包含的重要内容——GNU 通用公共许可证(GPL)。 #### 文件“copying.txt”的重要性 “copying.txt”文件是 Dev-C++ 分发包中的一个关键文档,其内容...

    How to use SFTP

    There are no formal standards for SSH private key files, however three main formats are in common use. All are supported by edtFTPj/PRO (PuTTY since version 1.5.7). Private Key Type Start of ...

    KCFinder|CKEditor的文件管理器 v2.5.1 多国语言版.zip

    03 Download multiple files or a folder as single ZIP file 04 Clipboard for copying and moving multiple files 05 Easy to integrate and configure in web applications 06 Return a list of selected ...

    xxcopy程序、进度条和说明

    16-bit version XXCOPY16 which allows copying files in DOS envrionment using short name only (to be later expanded to long name). You may also use it for synchronizing systems. In short, it is an ...

    Android代码-Noexes

    Copying Files Copy noexs.kip1 to the root of your switch sd card. Editing hekate_ipl.ini Using a text editor open hekate_ipl.ini (located within the bootloader directory on your switch's sd card) and ...

    The N-way Toolbox for MATLAB ver. 3.10

    After copying all files, go to the 'update' homepage in order to see if newer versions of individual files are available. Copy these files indiviually overwriting the old files. Make sure that the ...

Global site tag (gtag.js) - Google Analytics