Re: How to detect a file has resource fork, or not?
Re: How to detect a file has resource fork, or not?
- Subject: Re: How to detect a file has resource fork, or not?
- From: steve harley <email@hidden>
- Date: Wed, 17 Mar 2004 12:42:47 -0700
on 16 Mar 2004, at 2:36 AM, Chris Janton wrote:
warning - gratuitous use of "cat"
You can simply state the above command as
"wc -c " & res_path
yes of course, thanks
try
do shell script "test -s ~/foo/..namedfork/rsrc"
on error errMsg number errNum
{errMsg, errNum}
end try
"test -s" returns true if a file exists *and* has a size greater than 0
at the shell level that is cleanest.. but in applescript terms it
either returns nothing or it raises an error.. that reflects a
deficiency in do shell script more than anything else
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.