Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Functions PosixFile.open

1
2
3
4
5
6
7
8
9
10
11
12
13
module juptune.event.io;

static Result open(
    const char[] path, 
    PosixFile.AccessMode accessMode, 
    PosixFile.CreateMode createMode, 
    PosixFile.Flags flags, 
    PosixFile.ResolveFlags resolveFlags, 
    PosixFile.PermissionFlags permissions, 
    PosixDirectory* cwd, 
    PosixFile file, 
    bool pathIsNullTerminated = false
);

Documentation

Opens/creates a file at the given path, using the provided flags & modes to determine the exact behaviour of the opened file.

Notes

The O_CLOEXECflag is always specified when opening a file, due to its security benefits.

Params

Throws

Anything that juptuneEventLoopSubmitEvent.

Anything that the openat2syscall can generate (some errors are wrapped into an IoError, others will be a LinuxErrorinstead).

Returns

A Resultindicating whether something went wrong or not.