asys 0.3.0

Asynchronous sys std module

Released 2017-04-08.

To install, run:

haxelib install asys 0.3.0

See using Haxelib in Haxelib documentation for more information.

Maintainerbenmerckx
Websitehttps://github.com/benmerckx/asys
Current version0.3.0
StatisticsInstalled 946 times
LicenseMIT
Tags cross, js, utility

README.md

asys

Build Status Gitter

Asynchronous sys module for all sys targets and node.js. The structure mimics the haxe std sys classes. Each method has an asynchronous counterpart in asys. Asynchronous methods return a Future<Data> or a Surprise<Data, Error>.

For example where you would previously write

trace(FileSystem.exists(path));

That would become

FileSystem.exists(path).handle(function(exists)
	trace(exists)
);

Using tink_await this can be written as:

trace(@await FileSystem.exists(path));

There other shortcuts for working with futures and surprises which you can find in the tink_core documentation.

Currently implemented

All methods are handled asynchronously on node.js.
On other targets all methods are implemented using Future.sync. If used in combination with tink_runloop, file io will be done asynchronously.

asys
	io
		File
		FileInput
		FileOutput
		FileSeek
		Process
	net
		Host
		Socket
	ssl
		Socket
	FileStat
	FileSystem

License: MIT