summaryrefslogtreecommitdiff
path: root/src/util/io.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-12-04 18:29:42 +0100
committerKonstantin Käfer <mail@kkaefer.com>2014-12-04 20:02:50 +0100
commitabafb52f37beb5659efc2105ccd1568e1f754898 (patch)
tree6a60636d3497560ca61e5aae5f6d7061c4f18553 /src/util/io.cpp
parentbff6aeb4da41dee1f5f1cfa0be81b6c257257253 (diff)
downloadqtlocation-mapboxgl-abafb52f37beb5659efc2105ccd1568e1f754898.tar.gz
make most headers private
Diffstat (limited to 'src/util/io.cpp')
-rw-r--r--src/util/io.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/util/io.cpp b/src/util/io.cpp
deleted file mode 100644
index 76f7c35ade..0000000000
--- a/src/util/io.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <mbgl/util/io.hpp>
-
-#include <cstdio>
-#include <iostream>
-#include <sstream>
-#include <fstream>
-#include <stdexcept>
-
-namespace mbgl {
-namespace util {
-
-void write_file(const std::string &filename, const std::string &data) {
- FILE *fd = fopen(filename.c_str(), "wb");
- if (fd) {
- fwrite(data.data(), sizeof(std::string::value_type), data.size(), fd);
- fclose(fd);
- } else {
- throw std::runtime_error(std::string("Failed to open file ") + filename);
- }
-}
-
-std::string read_file(const std::string &filename) {
- std::ifstream file(filename);
- if (file.good()) {
- std::stringstream data;
- data << file.rdbuf();
- return data.str();
- } else {
- throw std::runtime_error(std::string("Cannot read file ") + filename);
- }
-}
-
-}
-}