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: Mon, 15 Mar 2004 10:17:14 -0700
on 15 Mar 2004, at 12:11 AM, Bill wrote:
Hello,
Anyone has idea how to detect a file has, or hasn't resource fork, by
applescript? The environment is Mac OS X 10.3.2, on HFS+.
first, technically, every HFS+ file has a resource fork, and your test
will be whether that resource fork is empty
here's a shell-based test
set f to choose file
set res_path to quoted form of POSIX path of f & "/..namedfork/rsrc"
set byte_count_str to do shell script "cat " & res_path & " | wc -c"
if byte_count_str as number is greater than 0 then
-- resource fork is non-empty
end if
_______________________________________________
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.