WARNING: The [sjs-3] engine was deprecated, use [sjs-4] instead. See sjs-4: chain.

File.prototype.chain()

Get all files along the file’s type chain, including self.

Syntax

file.chain() Collection

Description

Return a collection of all the files on the file’s type chain, including self. Note that the type chain length is limited in 8. The file type chain must not be broken.

Examples

File with empty type results in a type chain of only itself.

File with built-in type.

File type chain of 2.

Longest supported file type chain of 8.

File type chain too long (9).

File with broken type results in an error.

Subscribe to our newsletter!