summaryrefslogtreecommitdiff
path: root/klm/util/file.hh
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-03-09 22:24:05 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2012-03-09 22:24:05 -0500
commitd84bd0c1c88c6ae262577d21ac265d2c9d67b41a (patch)
tree8516772a45171846d06d11943bfe86f2ba9198f0 /klm/util/file.hh
parent89d63600524bc042b6c2741d7d67db6a3a74dc8c (diff)
parentda28444588103f418ed7cab5cbc298c048ea2b08 (diff)
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'klm/util/file.hh')
-rw-r--r--klm/util/file.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/klm/util/file.hh b/klm/util/file.hh
index 5c57e2a9..72c8ea76 100644
--- a/klm/util/file.hh
+++ b/klm/util/file.hh
@@ -65,7 +65,10 @@ class scoped_FILE {
std::FILE *file_;
};
+// Open for read only.
int OpenReadOrThrow(const char *name);
+// Create file if it doesn't exist, truncate if it does. Opened for write.
+int CreateOrThrow(const char *name);
// Return value for SizeFile when it can't size properly.
const uint64_t kBadSize = (uint64_t)-1;