Re: file or folder?
Re: file or folder?
- Subject: Re: file or folder?
- From: Michelle Steiner <email@hidden>
- Date: Mon, 20 Aug 2001 08:20:33 -0700
On 8/20/01 2:55 AM, Ray Phillips <email@hidden> wrote:
>
When a group of files and folders is dragged onto a droplet, what is the
>
recommended way of determining which items are files and which are folders?
Assuming that the item is foo
Two ways:
tell application "Finder"
set bar to foo as string
if last character of bar is ":" then
set isfolder to true
else
set isfolder to false
end if
end tell
or
set isfolder to folder of (info for foo)
The latter is only one line, but it has to get all the info for the item,
including its size. That means it has to total the sizes of all items
(no matter how deeply nested) in foo if foo is a folder. This can take
quite a while.
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------