Re: determining binary files from text
Re: determining binary files from text
- Subject: Re: determining binary files from text
- From: Sherm Pendley <email@hidden>
- Date: Thu, 28 Feb 2002 18:20:28 -0500
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--
_______________________________________________
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.