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

File.prototype.type()

Get/set a file’s type.

Syntax

// Get file.type() string // Set file.type(type string) File

Parameters

type string

The file’s new type.

Description

Get/set a file’s type, which must be a valid path or empty. See the filesystem specification for more details on what the type property is used for [TODO: add link].

Examples

Empty type.

Setting type, reading it back.

Type must be a valid path.

Type must be local path, must exclude domain.