summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/File.h
diff options
context:
space:
mode:
authorPeter Bell <peterbell10@live.co.uk>2020-05-15 04:35:43 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-05-16 10:39:05 +0200
commit3189a3cbee8eb9d7ded7605776a75f35e5e2f122 (patch)
tree616ed3031baa99e1f34123b645c5b3cb6ed73223 /src/OSSupport/File.h
parentEnable some more clang-tidy linter checks (#4738) (diff)
downloadcuberite-3189a3cbee8eb9d7ded7605776a75f35e5e2f122.tar
cuberite-3189a3cbee8eb9d7ded7605776a75f35e5e2f122.tar.gz
cuberite-3189a3cbee8eb9d7ded7605776a75f35e5e2f122.tar.bz2
cuberite-3189a3cbee8eb9d7ded7605776a75f35e5e2f122.tar.lz
cuberite-3189a3cbee8eb9d7ded7605776a75f35e5e2f122.tar.xz
cuberite-3189a3cbee8eb9d7ded7605776a75f35e5e2f122.tar.zst
cuberite-3189a3cbee8eb9d7ded7605776a75f35e5e2f122.zip
Diffstat (limited to 'src/OSSupport/File.h')
-rw-r--r--src/OSSupport/File.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/OSSupport/File.h b/src/OSSupport/File.h
index 0bb877186..689900816 100644
--- a/src/OSSupport/File.h
+++ b/src/OSSupport/File.h
@@ -80,6 +80,11 @@ public:
/** Writes up to a_NumBytes bytes from a_Buffer, returns the number of bytes actually written, or -1 on failure; asserts if not open */
int Write(const void * a_Buffer, size_t a_NumBytes);
+ int Write(std::string_view a_String)
+ {
+ return Write(a_String.data(), a_String.size());
+ }
+
/** Seeks to iPosition bytes from file start, returns old position or -1 for failure; asserts if not open */
long Seek (int iPosition);