views:

25

answers:

0

I have an object. It might be a document file, an alias file, a disk, a folder, etc. I can write code that looks like this:

if (class of f) is in {document file, alias file} then
    -- do something with this item
end if

I would like to change that code to something like this:

if f is an instance of file then
    -- do something with this item
end if

In other words, I want to see if my object is an instance of any class that derives from file. Is that possible in Applescript?