1. Javascript SDK

Class FileVersion

Represents the file version of an assembly

Constructors

FileVersion()

Declaration

new FileVersion()

Functions

parse(fileVersion)

Parses a file version string (format: <major>.<minor>.<patch>.<revision>) to an instance.

Declaration

function parse(fileVersion)

Parameters

TypeNameDescription
fileVersionThe file version string to parse

Returns

TypeDescription
A file version instance.

tryParse(fileVersion, defaultValue)

Tries to parse a file version string (see parse(fileVersion)) and returns null or the specified default value when it fails.

Declaration

function tryParse(fileVersion, defaultValue)

Parameters

TypeNameDescription
fileVersionThe file version string to parse
defaultValueThe value to return when parsing fails

Returns

TypeDescription
A file version instance or null.

smallerThan(otherVersion)

Compares if the current instance is smaller than the specified version.

Declaration

function smallerThan(otherVersion)

Parameters

TypeNameDescription
otherVersionThe version to compare the current instance to

Returns

TypeDescription
A boolean with the result.

smallerThanOrEqual(otherVersion)

Compares if the current instance is smaller or equal than the specified version.

Declaration

function smallerThanOrEqual(otherVersion)

Parameters

TypeNameDescription
otherVersionThe version to compare the current instance to

Returns

TypeDescription
A boolean with the result.

greaterThan(otherVersion)

Compares if the current instance is greater than the specified version.

Declaration

function greaterThan(otherVersion)

Parameters

TypeNameDescription
otherVersionThe version to compare the current instance to

Returns

TypeDescription
A boolean with the result.

greaterThanOrEqual(otherVersion)

Compares if the current instance is greater or equal than the specified version.

Declaration

function greaterThanOrEqual(otherVersion)

Parameters

TypeNameDescription
otherVersionThe version to compare the current instance to

Returns

TypeDescription
A boolean with the result.

equals(otherVersion)

Compares if the current instance equals (by values) the specified file.

Declaration

function equals(otherVersion)

Parameters

TypeNameDescription
otherVersionThe version to compare the current instance to

Returns

TypeDescription
A boolean with the result.

compareTo(otherVersion)

Compare the current instance with the specified file.

Declaration

function compareTo(otherVersion)

Parameters

TypeNameDescription
otherVersionThe version to compare the current instance to

Returns

TypeDescription
0 when the versions are equal,. 1 when the current instance is greater, -1 when the current instance is smaller

toString()

Gets the file version string representation for this instance.

Declaration

function toString()
If you have suggestions for improving this article, let us know!