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: Bill <email@hidden>
- Date: Tue, 16 Mar 2004 10:56:38 +0800
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
Thanks Steve & Doug, it's more complicated than I think.
bill
_______________________________________________
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.