• 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: determining binary files from text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: determining binary files from text


  • Subject: Re: determining binary files from text
  • From: Ed Silva <email@hidden>
  • Date: Thu, 28 Feb 2002 15:27:37 -0800

That's what I'm doing now. Works like a charm.

On Thursday, February 28, 2002, at 03:20 PM, Sherm Pendley wrote:

On Thursday, February 28, 2002, at 03:12 PM, Ed Silva wrote:

Unfortunately it is possible that someone could put binaries in a startup item folder, which causes my app to barf and die when it tires to parse it. So, how do I tell if a file is a binary or text?

Check the first two bytes - a script always begins with "#!" followed by the path to the script interpreter.

sherm--


Cheers,

--Ed
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: determining binary files from text (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: Random Number
  • Next by Date: Re: determining binary files from text
  • Previous by thread: Re: determining binary files from text
  • Next by thread: Re: determining binary files from text
  • Index(es):
    • Date
    • Thread