• 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: specify a NSPredicate for jpeg file names?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: specify a NSPredicate for jpeg file names?


  • Subject: Re: specify a NSPredicate for jpeg file names?
  • From: Mike Abdullah <email@hidden>
  • Date: Sun, 24 Aug 2008 11:03:51 +0100

Trying to base entirely upon filename extensions is a bad idea. Instead, iterate through the directory and check each file's UTI to see if it conforms to kUTTypeJPEG.

Mike.

On 24 Aug 2008, at 01:39, Angelo Chen wrote:

Hi,

I'd like to filter an array to return only jpeg file names like DSC0001.jpg, DSC0002.jpg, etc. could anybody help me modify the jpegPredicate for that mater? thanks

NSPredicate *jpegPredicate = [NSPredicate predicateWithFormat:@"SELF [c] 'b'"];
NSArray *lst = [[[NSFileManager defaultManager] directoryContentsAtPath:aDir] filteredArrayUsingPredicate:jpegPredicate];





為了不斷提升Yahoo! Mail,雅虎香港誠邀你參與意見調查。請前 往http://surveylink.yahoo.com/wix/p5429076.aspx 發表你的意見!
_______________________________________________


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

_______________________________________________

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


References: 
 >specify a NSPredicate for jpeg file names? (From: Angelo Chen <email@hidden>)

  • Prev by Date: Re: How to read pixel values of monochrome images
  • Next by Date: Core data entity creation design
  • Previous by thread: specify a NSPredicate for jpeg file names?
  • Next by thread: using OpenPanel to select volumes?
  • Index(es):
    • Date
    • Thread