Re: Folder or a package ?
Re: Folder or a package ?
- Subject: Re: Folder or a package ?
- From: "Thomas C." <email@hidden>
- Date: Mon, 12 May 2003 20:17:26 +0200
Thanks Christopher, I think System Events will do the trick.
Thomas
Christopher Nebel wrote :
On Sunday, May 11, 2003, at 11:27 AM, Thomas C. wrote:
Is there a way I can make the difference between a folder and a
package without using the 'info for' command which is too slow ?
Use the disk-folder-file suite in System Events:
tell application "System Events"
set f to folder "Applications" of disk "Jaguar"
set anApp to item "Address Book.app" of f
set aFolder to item "AppleScript" of f
class of anApp --> folder
class of aFolder --> folder
package folder of anApp --> true
package folder of aFolder --> false
end tell
(You might get a different answer for "class of" in a future release
-- it's not entirely logical that packages claim to be folders, though
that's what they really are on disk.)
--Chris Nebel
Apple Development Tools
_______________________________________________
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.