importOptions.canImportAs(type)
Description
Reports whether the file can be imported as the source of a particular object type. If this method returns true, you can set the given type as the value of the importAs attribute. See ImportOptions importAs attribute.
Parameters
type The type of file that can be imported. An ImportAsType enumerated value; one of:
ImportAsType.COMP
ImportAsType.FOOTAGE
ImportAsType.COMP_CROPPED_LAYERS
ImportAsType.PROJECT
Returns
Boolean.
Example
var io = new ImportOptions(File("c:\myFile.psd"));
if io.canImportAs(ImportAsType.COMP);
io.importAs = ImportAsType.COMP;