ios - Read and Write the MetaData contents as a File in Documents Directory -


    nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes);     nsstring *documentsdirectory = [paths objectatindex:0];     nsstring* arraytext = [metadataarray componentsjoinedbystring: @"\n"];      nsstring *path = [documentsdirectory stringbyappendingpathcomponent:@"employeedata.txt"];      [arraytext writetofile:path atomically:yes]; 

metadata array first object :

    {filesize:"9385033" labels:{viewed,starred,restricted,trashed,hidden}  originalfilename:"chamak challo - ra.one (2011) [mp3-320kbps-cbr].mp3" mimetype:"audio/mpeg"  title:"chamak challo - ra.one (2011) [mp3-320kbps-cbr].mp3" parents:[1]  md5checksum:"51d598c750102dd4bca09addf4d8212d" quotabytesused:"9385033"  lastmodifyingusername:"shadow.hibrise" copyable?:1  headrevisionid?:"0b7v4x9xjauwjr3dzm1fqwlpheefozgyyyzr2nudtlzhmb2fnpq" kind:"drive#file"  writerscanshare:1 appdatacontents?:0 modifieddate:"2014-03-04t11:13:32.649z" shared?:0  id:"0b7v4x9xjauwjdtuyew5ztvrntu0" ownernames:[1] userpermission:{etag,kind,id,type,role}  createddate:"2014-03-04t11:13:32.649z" fileextension:"mp3"  iconlink?:"https://ssl.gstatic.com/docs/doclist/images/icon_10_audio_list.png"  modifiedbymedate:"2014-03-04t11:13:32.634z" downloadurl:"https://doc-10-3s- docs.googleusercontent.com/docs/securesc/0ijvatgpdej0qafpk7qtp7n2jgndtb3d/ifb42us5ai6ae9ah4kalfu4cnrtl6j3n/1398153600000/18240796891762319987/18240796891762319987/0b7v4x9xjauwjdtuyew5ztvrntu0?h=16653014193614665626&e=download&gd=true" lastmodifyinguser?:{kind,displayname,permissionid,isauthenticateduser} editable:1 etag:""fglq6vwogr-hihy-psxfsltidgq/mtm5mzkzmtyxmjy0oq"" webcontentlink:"https://docs.google.com/uc?id=0b7v4x9xjauwjdtuyew5ztvrntu0&export=download" owners?:[1] alternatelink:"https://docs.google.com/file/d/0b7v4x9xjauwjdtuyew5ztvrntu0/edit? usp=drivesdk"} 

i want store array of objects file , vice versa.

you can use sqllite or core data instead of filesystem.

for core-data please refer link

for filesystem this can useful


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -