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

File.prototype.attrInt32()

Get/set int32 file attributes.

Syntax

file.attrInt32(key string) int32 file.attrInt32(key string, value int32) File

When setting file attributes, the file itself is returned so that method calls are chainable.

Parameters

key string

Name of the attribute.

value int32

Value to store.

Description

Get/set user defined int32 file attributes. When an attribute is not defined on the file, reading it returns the empty value of the type, which is 0 in case of int32. Int32 numbers range from -2,147,483,648 to +2,147,483,647.

Examples

Get/set value.

Getting undefined attribute.

Setting attribute on response file.