Libraries.System.Properties Documentation

The properties class is designed to gather information about the system that the user is running. Currently, it supports a general property action, GetProperty, which can gather any known system property. It also currently contains helper methods for determining which operating system the user is on and for determining which web page was requested if this is a web project. System properties are equivalent to what are often termed "environment variables."

Example Code

use Libraries.System.Properties

Properties properties
text address = properties:GetRequestedWebPage()
output address

Inherits from: Libraries.Language.Object

Summary

Variable Summary Table

VariablesDescription
text operatingSystemThis is a public constant for the operating system property name.
text requestedWebPageThis is a public constant for the web address environment variable, if one is set.

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns a CompareResult.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetEnvironmentVariable(text key)This action returns an environment variable from the system.
GetHashCode()This action gets the hash code for an object.
GetOperatingSystemName()This property returns the name of the operating system currently running the program.
GetProperty(text key)This action returns a property from the system.
GetRequestedWebPage()This helper method returns the requested web address if the project was a web project.
GetRunLocation()This action returns a the location of the running executable on the system.
SetProperty(text key, text value)This action sets a property on the system.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns a CompareResult. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

Example Code

use Libraries.Language.Support.CompareResult
        Object o
        Object t
        CompareResult result = o:Compare(t)

Parameters

Return

Libraries.Language.Support.CompareResult: The Compare result, Smaller, Equal, or Larger.

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(t)

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

GetEnvironmentVariable(text key)

This action returns an environment variable from the system.

Example Code

use Libraries.System.Properties

        Properties properties
        text value = properties:GetEnvironmentVariable("quorum.url")
        output value

Parameters

Return

text:

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

GetOperatingSystemName()

This property returns the name of the operating system currently running the program.

Example Code

use Libraries.System.Properties

    Properties properties
    text value = properties:GetOperatingSystemName()
    output value

Return

text:

GetProperty(text key)

This action returns a property from the system.

Example Code

use Libraries.System.Properties

        Properties properties
        text value = properties:GetProperty("os.name")
        output value

Parameters

Return

text:

GetRequestedWebPage()

This helper method returns the requested web address if the project was a web project.

Example Code

use Libraries.System.Properties

    Properties properties
    text address = properties:GetRequestedWebPage()
    output address

Return

text:

GetRunLocation()

This action returns a the location of the running executable on the system.

Example Code

use Libraries.System.Properties
        use Libraries.System.File

        Properties properties
        File file = properties:GetRunPath()
        output file:GetAbsolutePath()

Return

Libraries.System.File:

SetProperty(text key, text value)

This action sets a property on the system.

Example Code

use Libraries.System.Properties

        Properties properties
        properties:SetProperty("my.custom.property", "value")

Parameters