Re: Swift: combining Obj-C enums
Re: Swift: combining Obj-C enums
- Subject: Re: Swift: combining Obj-C enums
- From: Greg Parker <email@hidden>
- Date: Wed, 09 Sep 2015 18:43:07 -0700
> On Sep 9, 2015, at 6:28 PM, Rick Mann <email@hidden> wrote:
>
> I've not found a succinct way to do this. Is there one?
>
> let files = try fm.contentsOfDirectoryAtURL(inFile,
> includingPropertiesForKeys: nil,
> options: .SkipsSubdirectoryDescendants | .SkipsPackageDescendants | .SkipsHiddenFiles)
In Swift 2 this is an OptionSetType. An option set literal looks like this:
[.SkipsSubdirectoryDescendants, .SkipsPackageDescendants, .SkipsHiddenFiles]
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden