High-performance I/O utility functions.

Static methods

staticcloseHandle(handle:NativeHandle):Void

Closes a raw native handle.

staticopenFile(path:String, writeMode:Bool):NativeHandle

Opens a file and returns a raw native handle. This avoids needing to access private Haxe fields.

staticsendFile(socket:ISocket, path:String, offset:Int64, length:Int64):Int64

Transfers data from a file directly to a socket using zero-copy mechanism where supported.

staticsetDirectIO(handle:NativeHandle, enabled:Bool):Bool

Toggles Direct I/O (O_DIRECT / F_NOCACHE) for a raw handle.