Packagecom.hippohx
Classpublic class System
InheritanceSystem Inheritance HaxeBackendListener Inheritance flash.events.EventDispatcher

The System class provides information referent to the operating system in which the application runs.



Protected Properties
 PropertyDefined by
 InheritedHAXE_BACKEND : String = ""
HAXE_BACKEND defines the ID that a Neko backend needs to use to call methods on this class (or the class extending this one).
HaxeBackendListener
Public Methods
 MethodDefined by
  
Do NOT call this constructor, please use getInstance method instead.
System
  
Clears system's clipboard.
System
  
Returns the path to system's application data folder.
System
  
Gets system's clipboard.
System
 Inherited
Returns HAXE_BACKEND API identifier.
HaxeBackendListener
  
[static] Use this method to retrieve an instance of the class, do NOT call the constructor directly.
System
  
Returns a ScreenSizeObject with system's screen width and height.
System
  
getSystemName():String
Returns a String with the name of the operating system.
System
  
Returns a String with system's path separator.
System
  
getTempFolder():String
Returns a String with path to the system's temp folder.
System
  
getUserFolder():String
Returns the path to user's data folder.
System
  
isMac():Boolean
Checks if the running operating system is Mac.
System
  
isWindows():Boolean
Checks if the running operating system is Windows.
System
  
setClipBoardText(txt:String):void
Sets system's clipboard.
System
Public Constants
 ConstantDefined by
  MAC : String = "Mac"
[static] Mac identifier.
System
  MAC_SEPARATOR : String = "/"
[static] Mac path separator.
System
  WIN : String = "Windows"
[static] Windows identifier.
System
  WIN_SEPARATOR : String = "\"
[static] Windows path separator.
System
Constructor detail
System()constructor
public function System()

Do NOT call this constructor, please use getInstance method instead.

See also

Method detail
clearClipBoard()method
public function clearClipBoard():void

Clears system's clipboard.

Neko call is systools.Clipboard.clear();.

See also

getAppDataFolder()method 
public function getAppDataFolder():String

Returns the path to system's application data folder. Please use this folder to store any files your application might need such as configuration files, etc. Read Keep your data in the right place for more info.

Returns
String — A string with the path to system's application data folder. In Windows is the value of %APPDATA% and in Macs ~/Library/Application Support.
getClipBoardText()method 
public function getClipBoardText():String

Gets system's clipboard.

Neko call is systools.Clipboard.getText();.

Returns
String — System's clipboard.

See also

getInstance()method 
public static function getInstance():System

Use this method to retrieve an instance of the class, do NOT call the constructor directly. Note that you don't need to store the instance to access its methods, you can simply do this:

var userFolder:String = System.getInstance().getUserFolder();

Returns
System
getScreenSize()method 
public function getScreenSize():ScreenSizeObject

Returns a ScreenSizeObject with system's screen width and height.

Neko call is systools.Clipboard.getScreenSize();.

Returns
ScreenSizeObject — A ScreenSizeObject with system's screen width and height.

See also

getSystemName()method 
public function getSystemName():String

Returns a String with the name of the operating system.

Returns
String — A String with name of the operating system. "Windows" for Windows and "Mac" for errr... Macs.

See also

getSystemSeparator()method 
public function getSystemSeparator():String

Returns a String with system's path separator.

Returns
String — A String with system's path separator, "/" for Macs, "\" for Windows.

See also

getTempFolder()method 
public function getTempFolder():String

Returns a String with path to the system's temp folder.

Returns
String — A String with path to the system's temp folder.
getUserFolder()method 
public function getUserFolder():String

Returns the path to user's data folder. Please do NOT use this folder to store any files your application might need such as configuration files, etc. Read Keep your data in the right place for more info.

Returns
String — A string with the path to user's data folder. In Windows is the value of "C:\Windows\Documents and Settings\\user" and in Macs the value of the $HOME variable.

See also

isMac()method 
public function isMac():Boolean

Checks if the running operating system is Mac.

Returns
Boolean — true if the running operating system is Mac, false otherwise.

See also

isWindows()method 
public function isWindows():Boolean

Checks if the running operating system is Windows.

Returns
Boolean — true if the running operating system is Windows, false otherwise.

See also

setClipBoardText()method 
public function setClipBoardText(txt:String):void

Sets system's clipboard.

Neko call is systools.Clipboard.setText(txt);.

Parameters
txt:String

See also

Constant detail
MACconstant
public static const MAC:String = "Mac"

Mac identifier.

See also

MAC_SEPARATORconstant 
public static const MAC_SEPARATOR:String = "/"

Mac path separator.

See also

WINconstant 
public static const WIN:String = "Windows"

Windows identifier.

See also

WIN_SEPARATORconstant 
public static const WIN_SEPARATOR:String = "\"

Windows path separator.

See also