summaryrefslogtreecommitdiff
path: root/klm/util/file.hh
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-10-10 19:08:57 +0100
committerKenneth Heafield <github@kheafield.com>2012-10-10 19:08:57 +0100
commitddb3eb611b00a2a80936b92b95e94d33896990da (patch)
treee8cfb4c04c7fd1b2ee286529240cd5f0f40df273 /klm/util/file.hh
parent78852b7e349b1a3c68596178b60c7631b8836336 (diff)
Update KenLM
Diffstat (limited to 'klm/util/file.hh')
-rw-r--r--klm/util/file.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/klm/util/file.hh b/klm/util/file.hh
index 8af1ff4f..185cb1f3 100644
--- a/klm/util/file.hh
+++ b/klm/util/file.hh
@@ -80,6 +80,7 @@ void ReadOrThrow(int fd, void *to, std::size_t size);
std::size_t ReadOrEOF(int fd, void *to_void, std::size_t amount);
void WriteOrThrow(int fd, const void *data_void, std::size_t size);
+void WriteOrThrow(FILE *to, const void *data, std::size_t size);
void FSyncOrThrow(int fd);
@@ -90,6 +91,8 @@ void SeekEnd(int fd);
std::FILE *FDOpenOrThrow(scoped_fd &file);
+std::FILE *FOpenOrThrow(const char *path, const char *mode);
+
class TempMaker {
public:
explicit TempMaker(const std::string &prefix);
@@ -98,9 +101,6 @@ class TempMaker {
int Make() const;
std::FILE *MakeFile() const;
- // This will force you to close the fd instead of leaving it open.
- std::string Name(scoped_fd &opened) const;
-
private:
std::string base_;
};