title: How to find all contents with modified date of the directory in Objective C code
body: <p>This requirement is very specific to read directory contents along with date modified for all sub files and folders. In windows we have some API's but I didn't find similar function in Mac OS development. I searched for this where I found that NSFileManager can be used for this.I found one place where I can get the path contents under Documents directory.</p>
  
  <p>Here is the piece of code code which I have.</p>
  
  <pre><code>NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString *documentsPath = [paths objectAtIndex:0];
  
  NSFileManager *manager = [[NSFileManager alloc] init];
  NSDirectoryEnumerator *fileEnumerator = [manager enumeratorAtPath:documentsPath];
  
  for (NSString *filename in fileEnumerator) {
      // Do something with file
      NSLog(@"file name : %@",filename );
  }
  </code></pre>
  
  <p>But my requirement is to find the contents under any path on machine with the date modified for all sub files and a folders in it.Please guide me on it.</p>
  
  <p>Thanks,
  Tausif.</p>