title: Complete FIle List in Table view
body: <p><strong>The Situation</strong>:
  I am trying to display a list of files from my app's Documents Directory (iOS) in a UITableView.</p>
  
  <p><strong>The Problem</strong>:
  When the view loads, instead of listing all the files, it only lists one file (the first one alphabetically)</p>
  
  <p><strong>The Code</strong>:</p>
  
  <pre><code>cell.textLabel.text = [NSString  stringWithFormat:@"Cell Row #%d", [indexPath row]];
  NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString *documentsDirectory = [paths objectAtIndex:0];
  NSPredicate *filter = [NSPredicate predicateWithFormat:@"self ENDSWITH '.txt'"];
  NSArray *fileListAct = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:documentsDirectory error:nil];
  NSArray *FileList = [fileListAct filteredArrayUsingPredicate:filter];
  cell.textLabel.text = [NSString stringWithFormat:@"%@",[FileList objectAtIndex:indexPath.row]];
  NSLog(@"File List: %@", FileList);
  </code></pre>
  
  <p>All of the code performs as it should, and even the last NSLog line lists ALL of the file names, but for some reason in the UiTableView it only lists the first file name.</p>
  
  <p><strong>More Info</strong>:
  I've tried creating a <code>do</code> loop for the last <code>cell.textlabel.text</code> line, but that also requires a <code>while</code> statement (and I couldn't think of what the condition would be).</p>
  
  <p><strong>Any ideas on how to make the UITableView display all file names vs. just the first one?</strong></p>