• 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: fileExistsAtPath with * to indicate random
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fileExistsAtPath with * to indicate random


  • Subject: Re: fileExistsAtPath with * to indicate random
  • From: "Kyle Sluder" <email@hidden>
  • Date: Mon, 10 Mar 2008 12:33:18 -0400

On Mon, Mar 10, 2008 at 12:10 PM, Mr. Gecko <email@hidden> wrote:
>  But it does not seem to know * as a random indicator like PHP and
>  Terminal does. I can't seem to think of a way to do this so, if any
>  one can help me figure this out I would be very grateful.

It's not "random", it's called a "glob" (or more formally "pattern
matching").  Your shell does that for you; when you do `ls foo*`, the
shell checks to see if there are any entries that match that pattern
in the current directory, and if so replaces the pattern with them
before executing the command; the result is the same as if you had
typed `ls foo1 foo2 foo3`.  If no file exists matching that pattern,
the shell passes the pattern through unscathed, at which point ls will
complain it can't find a file named `foo*`.

The point I'm trying to make is that PHP's auto-globbing is strange.

--Kyle Sluder
_______________________________________________

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: 
 >fileExistsAtPath with * to indicate random (From: "Mr. Gecko" <email@hidden>)

  • Prev by Date: Re: results in attached view
  • Next by Date: CIImage (TIFFRepresentation) memory leak
  • Previous by thread: Re: fileExistsAtPath with * to indicate random
  • Next by thread: Re: fileExistsAtPath with * to indicate random
  • Index(es):
    • Date
    • Thread