Completion-based asynchronous file operations.

Static methods

@:value({ writeMode : false })staticopen(loop:NativeLoop, path:String, writeMode:Bool = false):AsyncFile

Opens a file for asynchronous operations.

Methods

close():Void

Closes the file.

read(length:Int, callback:(result:Int, data:NativeBuffer) ‑> Void):Void

Performs an asynchronous read from the file.

write(data:NativeBuffer, callback:(result:Int, bytes:Int) ‑> Void):Void

Performs an asynchronous write to the file.