> On 8 Jul 2015, at 08:26, Quincey Morris <quinceymor...@rivergatesoftware.com> 
> wrote:
> 
> On Jul 7, 2015, at 16:58 , Rick Mann <rm...@latencyzero.com> wrote:
>> 
>> Also, the enumerator is a NSDirectoryEnumerator. It returns AnyObject type, 
>> so wouldn't there have to be an NSURL cast in there somewhere?
> 
> 
> Try:
> 
>> for case let url as NSURL in enumerator
> 

Two obersvations

1) If you’re sure it’s not nil, which for that particular case of an enumerator 
from a filemanager I’d agree it’s not (can’t make one work in a playground to 
test) then just force-unwrap it
2) As concise as ‘for case let url as NSURL in eumerator’ is, I think the 
original code was somewhat clearer for the next guy maintaining it


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to