Access operating system level settings and operations.
Static variables
staticread onlyapplicationDirectory:String
The path to the directory where the application is installed, along with its supporting files. In many cases, this directory is read-only, and attempts to write to files, create new files, or delete files in this directory are likely fail.
staticread onlyapplicationStorageDirectory:String
The application's dedicated storage directory, which unique to each application and user. Useful for storing settings on a user-specific and application-specific basis.
This directory may or may not be removed when the application is uninstalled, and it depends on the platform and installer technology that is used.
Static methods
staticembed(projectName:String, element:Dynamic, ?width:Int, ?height:Int, ?config:Dynamic):Void
Available on HTML5
staticexit(code:Int):Void
Available on Android, Linux, Mac, Windows, iOS
Attempts to exit the application. Dispatches onExit
, and will not
exit if the event is canceled. When exiting using this method, Lime will
gracefully shut down a number of subsystems, including (but not limited
to) audio, graphics, timers, and game controllers.
To properly exit a Lime application, it's best to call Lime's
System.exit()
instead of calling Haxe's built-in Sys.exit()
. When
targeting native platforms especially, Lime's is built on C++ libraries
that expose functions to clean up resources properly on exit. Haxe's
Sys.exit()
exits immediately without giving Lime a chance to clean
things up. With that in mind, the proper and correct way to exit a Lime
app is by calling lime.system.System.exit()
, and to avoid using
Sys.exit()
.
staticinlineload(library:String, method:String, args:Int = 0, lazy:Bool = false):Dynamic
Available on Android, Linux, Mac, Windows, iOS
staticopenFile(path:String):Void
Opens a file with the suste, default application.
In a web browser, opens a URL with target _blank
.
staticopenURL(url:String, target:String = "_blank"):Void
Opens a URL with the specified target web browser window.