summaryrefslogtreecommitdiff
path: root/src/io/read.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-07-17 16:50:40 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-07-17 23:35:14 -0700
commit25070b355b8a0394c1fbd9cf82c44752b5a8b8c3 (patch)
tree5e8edf1e5e3f58a8b11b1fcdd2fa851b2322df35 /src/io/read.cpp
parent3b0b6deecf156916a9fb68dda9ca4b8a47d65aab (diff)
downloadtmwa-25070b355b8a0394c1fbd9cf82c44752b5a8b8c3.tar.gz
tmwa-25070b355b8a0394c1fbd9cf82c44752b5a8b8c3.tar.bz2
tmwa-25070b355b8a0394c1fbd9cf82c44752b5a8b8c3.tar.xz
tmwa-25070b355b8a0394c1fbd9cf82c44752b5a8b8c3.zip
Add dir annoyances
Diffstat (limited to 'src/io/read.cpp')
-rw-r--r--src/io/read.cpp4
1 files changed, 4 insertions, 0 deletions
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();