iOS 快速获取沙盒下任意文件夹的路径

    NSLog(@"%@", NSHomeDirectory());//沙盒主目录
    NSLog(@"%@", NSTemporaryDirectory());//沙盒中tmp文件夹的路径
    NSLog(@"%@", [[NSBundle mainBundle] bundlePath]);//沙盒中*.app包的路径
    NSLog(@"%@", [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]);//沙盒中document文件夹的路径

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章