objective c - How to list out Recently Opened documents in iOS? -
i have listed out documents in nsdocument directory , im able documents modified using :
nsmutablearray* filesandproperties = [nsmutablearray arraywithcapacity:[filesarray count]]; for(nsstring* file in filesarray) { nsstring* filepath = [imgr.documentspath stringbyappendingpathcomponent:file]; nsdictionary* properties = [[nsfilemanager defaultmanager] attributesofitematpath:filepath error:&error]; nsdate* moddate = [properties objectforkey:nsfilemodificationdate]; if(error == nil) { [filesandproperties addobject:[nsdictionary dictionarywithobjectsandkeys: file, @"path", moddate, @"lastmoddate", nil]]; } }
by fallowing : get directory contents in date modified order
now how can list out documents have been opened , viewed user without editing or modifications ?
Comments
Post a Comment