Sometimes program development needs to share files with users through the Documents folder in the sandbox, itunes default is not support itunes file sharing, first set
Info-list's application supports ITunes file sharing is yes.
This allows the program to support file sharing.
Then after I cracked the ipad, I put something in it with 91 assistants, and as a test, the code to access the document path is as follows:
NSString *homedir = Nshomedirectory (); Nsarray *paths = Nssearchpathfordirectoriesindomains (nsdocumentdirectory,nsuserdomainmask,yes); NSString *docdir = [Paths objectatindex:0];
After obtaining the path, use Nsfilemanager to obtain the inside file name stored in Nsarray.
Nsarray *filename = [[Nsfilemanager defaultmanager]contentsofdirectoryatpath:docdir Error:Nil];
This allows you to get the name of the file under document.