Re: determining binary files from text
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.