summaryrefslogtreecommitdiff
path: root/src/io/write.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/write.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/write.cpp')
-rw-r--r--src/io/write.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/io/write.cpp b/src/io/write.cpp
index 3326d2c..833b173 100644
--- a/src/io/write.cpp
+++ b/src/io/write.cpp
@@ -41,6 +41,9 @@ namespace io
WriteFile::WriteFile(ZString name, bool linebuffered)
: fd(FD::open(name, O_WRONLY | O_CREAT | O_TRUNC, 0666)), lb(linebuffered), buflen(0)
{}
+ WriteFile::WriteFile(const DirFd& dir, ZString name, bool linebuffered)
+ : fd(dir.open_fd(name, O_WRONLY | O_CREAT | O_TRUNC, 0666)), lb(linebuffered), buflen(0)
+ {}
WriteFile::~WriteFile()
{
if (fd != FD())