From 25070b355b8a0394c1fbd9cf82c44752b5a8b8c3 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Thu, 17 Jul 2014 16:50:40 -0700 Subject: Add dir annoyances --- src/io/fd.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/io/fd.hpp') diff --git a/src/io/fd.hpp b/src/io/fd.hpp index 6fb745d..d04d5bf 100644 --- a/src/io/fd.hpp +++ b/src/io/fd.hpp @@ -56,8 +56,13 @@ namespace io FD stdout() { return FD(1); } static FD stderr() { return FD(2); } + + static const int DEFAULT_MODE = 0666; + static - FD open(ZString path, int flags, int mode=0666); + FD open(ZString path, int flags, int mode=DEFAULT_MODE); + static + FD openat(FD dirfd, ZString path, int flags, int mode=DEFAULT_MODE); static FD socket(int domain, int type, int protocol); FD accept(struct sockaddr *addr, socklen_t *addrlen); @@ -65,6 +70,7 @@ namespace io int pipe(FD& r, FD& w); static int pipe2(FD& r, FD& w, int flags); + static FD sysconf_SC_OPEN_MAX(); -- cgit v1.2.3-70-g09d2