summaryrefslogtreecommitdiff
path: root/klm/util/file.hh
diff options
context:
space:
mode:
authorKenneth Heafield <kenlm@kheafield.com>2012-03-09 16:35:10 -0500
committerKenneth Heafield <kenlm@kheafield.com>2012-03-09 16:35:10 -0500
commitda28444588103f418ed7cab5cbc298c048ea2b08 (patch)
tree4c8bdc831a76d5bb5ed64a858d7e66af059e0e07 /klm/util/file.hh
parent0ab9e175f86b3fd02a4a94f350282210aba054e3 (diff)
KenLM d45e2be including CreateOrThrow for Jon
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;