• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to detect a file has resource fork, or not?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >How to detect a file has resource fork, or not? (From: Bill <email@hidden>)
 >Re: How to detect a file has resource fork, or not? (From: steve harley <email@hidden>)

  • Prev by Date: Subfolder archiving errors
  • Next by Date: Re: finding newest file in a folder
  • Previous by thread: Re: How to detect a file has resource fork, or not?
  • Next by thread: Re: How to detect a file has resource fork, or not?
  • Index(es):
    • Date
    • Thread