how to use nsdocuments directory for downloads in iphone

后端 未结 3 2010
情深已故
情深已故 2021-01-27 06:31

I have an iphone app with downloads option and iam using nsdocument directory path for downloading.but after the download how can i get to access the documents path in iphone.

3条回答
  •  轮回少年
    2021-01-27 06:56

    //NSDownloadsDirectory = For Download folder

    //NSDocumentDirectory = For Document folder

        NSArray *pathArr = NSSearchPathForDirectoriesInDomains(NSDownloadsDirectory , NSUserDomainMask, YES);
        NSString *downloadsDir = [paths objectAtIndex:0];
    
    Store the content to this path(you can create a folder in it too.). And also fetch the files stored in this folder, by enumerating to the files in this directory
    

提交回复
热议问题