iOS 快速獲取沙盒下任意文件夾的路徑

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

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