Skip to content

Instantly share code, notes, and snippets.

@cygx
Created May 13, 2015 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cygx/89984bc8b82c4609d280 to your computer and use it in GitHub Desktop.
Save cygx/89984bc8b82c4609d280 to your computer and use it in GitHub Desktop.
open modes
p6 moar compat p5 C11
:r r < r
:rw + +< r+
:ra +a
:w -ct w > w
:wx -cx wx wx
:wr +ct +> w+
:wrx +cx w+x
:a -ca wa >> a
:ar +ca +>> a+
moar to posix
r O_RDONLY
- O_WRONLY
+ O_RDWR
a O_APPEND
c O_CREAT
x O_EXCL
t O_TRUNC
moar compat alias
w -ct
w? -c?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment