Environment

Overview

Helper class to access information about the current process environment.

Location

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

Environment()

 

init()

 

Environment()

CurrentDirectory

Returns the current directory

 

class method CurrentDirectory: String

 

static String CurrentDirectory()

 

static func CurrentDirectory() -> String

 

static String CurrentDirectory()

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

GetEnvironmentVariable

Gets the value of an environment variable.

 

class method GetEnvironmentVariable(Name: String): String

 

static String GetEnvironmentVariable(String Name)

 

static func GetEnvironmentVariable(_ Name: String) -> String

 

static String GetEnvironmentVariable(String Name)

Parameters:

  • Name: The name of the environment variable to find.

GetEnvironmentVariables

Returns all environment variables.

 

// watchOS-arm64
class method GetEnvironmentVariables: Dictionary<String, String>
// Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows
class method GetEnvironmentVariables: ImmutableDictionary<String, String>

 

// watchOS-arm64
static Dictionary<String, String> GetEnvironmentVariables()
// Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows
static ImmutableDictionary<String, String> GetEnvironmentVariables()

 

// watchOS-arm64
static func GetEnvironmentVariables() -> Dictionary<String, String>
// Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows
static func GetEnvironmentVariables() -> ImmutableDictionary<String, String>

 

// watchOS-arm64
static Dictionary<String, String> GetEnvironmentVariables()
// Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows
static ImmutableDictionary<String, String> GetEnvironmentVariables()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

NewLine

Contains a newline character; #10 on Posix; #13#10 on Windows.

 

class property NewLine: String read;

 

class String NewLine { get; }

 

static var NewLine: String { get{} }

 

class String NewLine { __get; }

OSName

Returns the name of the OS.

 

class property OSName: String read;

 

class String OSName { get; }

 

static var OSName: String { get{} }

 

class String OSName { __get; }

OSVersion

Returns the OS version.

 

class property OSVersion: String read;

 

class String OSVersion { get; }

 

static var OSVersion: String { get{} }

 

class String OSVersion { __get; }

ProcessorCount

Returns the number of processors.

 

class method ProcessorCount: Int32

 

static Int32 ProcessorCount()

 

static func ProcessorCount() -> Int32

 

static Int32 ProcessorCount()

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

SetEnvironmentVariable

Sets the value of an environment variable.

 

class method SetEnvironmentVariable(Name: String; Value: String): Boolean

 

static Boolean SetEnvironmentVariable(String Name, String Value)

 

static func SetEnvironmentVariable(_ Name: String, _ Value: String) -> Boolean

 

static Boolean SetEnvironmentVariable(String Name, String Value)

Parameters:

  • Name:
  • Value:

TempFolder Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows

Contains the folder for the temp files.

 

class method TempFolder: Folder

 

static Folder TempFolder()

 

static func TempFolder() -> Folder

 

static Folder TempFolder()

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

UserHomeFolder Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows

Contains the users home directory.

 

class method UserHomeFolder: Folder

 

static Folder UserHomeFolder()

 

static func UserHomeFolder() -> Folder

 

static Folder UserHomeFolder()

UserName

Contains the users username.

 

class property UserName: String read;

 

class String UserName { get; }

 

static var UserName: String { get{} }

 

class String UserName { __get; }

 

NewLine

Contains a newline character; #10 on Posix; #13#10 on Windows.

 

class property NewLine: String read;

 

class String NewLine { get; }

 

static var NewLine: String { get{} }

 

class String NewLine { __get; }

OSName

Returns the name of the OS.

 

class property OSName: String read;

 

class String OSName { get; }

 

static var OSName: String { get{} }

 

class String OSName { __get; }

OSVersion

Returns the OS version.

 

class property OSVersion: String read;

 

class String OSVersion { get; }

 

static var OSVersion: String { get{} }

 

class String OSVersion { __get; }

UserName

Contains the users username.

 

class property UserName: String read;

 

class String UserName { get; }

 

static var UserName: String { get{} }

 

class String UserName { __get; }

 

CurrentDirectory

Returns the current directory

 

class method CurrentDirectory: String

 

static String CurrentDirectory()

 

static func CurrentDirectory() -> String

 

static String CurrentDirectory()

GetEnvironmentVariable

Gets the value of an environment variable.

 

class method GetEnvironmentVariable(Name: String): String

 

static String GetEnvironmentVariable(String Name)

 

static func GetEnvironmentVariable(_ Name: String) -> String

 

static String GetEnvironmentVariable(String Name)

Parameters:

  • Name: The name of the environment variable to find.

GetEnvironmentVariables

Returns all environment variables.

 

// watchOS-arm64
class method GetEnvironmentVariables: Dictionary<String, String>
// Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows
class method GetEnvironmentVariables: ImmutableDictionary<String, String>

 

// watchOS-arm64
static Dictionary<String, String> GetEnvironmentVariables()
// Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows
static ImmutableDictionary<String, String> GetEnvironmentVariables()

 

// watchOS-arm64
static func GetEnvironmentVariables() -> Dictionary<String, String>
// Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows
static func GetEnvironmentVariables() -> ImmutableDictionary<String, String>

 

// watchOS-arm64
static Dictionary<String, String> GetEnvironmentVariables()
// Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS Simulator, watchOS-arm64_32, watchOS-armv7k, WebAssembly, Windows
static ImmutableDictionary<String, String> GetEnvironmentVariables()

ProcessorCount

Returns the number of processors.

 

class method ProcessorCount: Int32

 

static Int32 ProcessorCount()

 

static func ProcessorCount() -> Int32

 

static Int32 ProcessorCount()

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

SetEnvironmentVariable

Sets the value of an environment variable.

 

class method SetEnvironmentVariable(Name: String; Value: String): Boolean

 

static Boolean SetEnvironmentVariable(String Name, String Value)

 

static func SetEnvironmentVariable(_ Name: String, _ Value: String) -> Boolean

 

static Boolean SetEnvironmentVariable(String Name, String Value)

Parameters:

  • Name:
  • Value:

TempFolder Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows

Contains the folder for the temp files.

 

class method TempFolder: Folder

 

static Folder TempFolder()

 

static func TempFolder() -> Folder

 

static Folder TempFolder()

UserHomeFolder Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, Windows

Contains the users home directory.

 

class method UserHomeFolder: Folder

 

static Folder UserHomeFolder()

 

static func UserHomeFolder() -> Folder

 

static Folder UserHomeFolder()

 

constructor    (declared in Object)

Default constructor.

 

constructor

 

Environment()

 

init()

 

Environment()

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()