Home:ALL Converter>How to find list of files which are not accessed for last two month?

How to find list of files which are not accessed for last two month?

Ask Time:2013-09-12T18:38:38         Author:karan

Json Formatter

I am creating a app which is used to download files from internet and saves into document directory.At one time that document directory occupied huge memory because user has saved more files.Now I decide to delete the files which are not accessed by user for last two months.I want to know Is there any in build Ios options to find list of files under document directory based on files modification date?please help me.

Author:karan,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/18761971/how-to-find-list-of-files-which-are-not-accessed-for-last-two-month
srinivas n :

Try this. I think the array gives the information of file with modification date.\n\nTry to create one function depending on date comparison and delete the files. \n\nNSArray * arrayOfURLs = [fileManager contentsOfDirectoryAtURL:URL \n includingPropertiesForKeys:@[NSURLIsDirectoryKey, \n NSURLNameKey, \n NSURLFileSizeKey, \n NSURLContentModificationDateKey,\n NSURLLocalizedTypeDescriptionKey]\n options:NSDirectoryEnumerationSkipsHiddenFiles \n error:nil];\n",
2013-09-12T10:49:27
yy