Use fast enumeration instead, since we don't need the i other than getting the ith element:
<pre>
    for (NSString* fileName in contents) {

</pre>