• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Swift: combining Obj-C enums
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Swift: combining Obj-C enums
      • From: Rick Mann <email@hidden>
References: 
 >Swift: combining Obj-C enums (From: Rick Mann <email@hidden>)

  • Prev by Date: Swift: combining Obj-C enums
  • Next by Date: Re: Swift: combining Obj-C enums
  • Previous by thread: Swift: combining Obj-C enums
  • Next by thread: Re: Swift: combining Obj-C enums
  • Index(es):
    • Date
    • Thread