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/read.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/io/read.cpp') diff --git a/src/io/read.cpp b/src/io/read.cpp index d057ca6..3ae5246 100644 --- a/src/io/read.cpp +++ b/src/io/read.cpp @@ -42,6 +42,10 @@ namespace io : fd(FD::open(name, O_RDONLY | O_CLOEXEC)), start(0), end(0) { } + ReadFile::ReadFile(const DirFd& dir, ZString name) + : fd(dir.open_fd(name, O_RDONLY | O_CLOEXEC)), start(0), end(0) + { + } ReadFile::~ReadFile() { fd.close(); -- cgit v1.2.3-60-g2f50