summaryrefslogtreecommitdiff
path: root/klm/util/file.hh
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-10-10 19:02:40 +0100
committerKenneth Heafield <github@kheafield.com>2012-10-10 19:02:40 +0100
commita36fcc5d55c1de84ae68c1091ebff2b1c32dc3b7 (patch)
tree1c22c35065e52c5ae69fa915bd502939be801374 /klm/util/file.hh
parent8a10fd2856e13489cc10d2c683ecbce687f1e5ff (diff)
KenLM 8307220
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_;
};