18 lines
578 B
Plaintext
18 lines
578 B
Plaintext
open
|
|
====
|
|
:title: Shellcode Compiler Runtime
|
|
|
|
---------------------------------------------
|
|
int open(const char* file, int flags, int mode);
|
|
---------------------------------------------
|
|
|
|
Opens the file at `path`. The `flags` argument is typically `O_RDONLY`, `O_WRONLY`, or `O_RDWR`. The `mode`
|
|
argument specifies the file permissions if the file is created.
|
|
|
|
IMPORTANT: The `mode` parameter must always be specified for this runtime, even when not creating a file. Use
|
|
zero or the `__undefined` intrinsic when not creating a file.
|
|
|
|
See also
|
|
--------
|
|
link:close.html[close]
|