AsyncFile.open

OpenStatus open(ref EventLoop loop, scope const(char)[] path, int flags) @trusted

Open a file asynchronously.

Parameters

loopEvent loop to register with.
pathPath to the file to open.
flagsPOSIX-like open flags (O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_TRUNC, O_APPEND).

Returns

OpenStatus — success, or an OpenError payload with the reason

and the captured OS error code.