From c6277401fb4dafbe08bac534e0de7796f70a0d19 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 10 Feb 2017 21:18:26 +0300 Subject: Add some missing functions into virtfs. --- src/utils/virtfs.cpp | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'src/utils/virtfs.cpp') diff --git a/src/utils/virtfs.cpp b/src/utils/virtfs.cpp index 3211d91dd..af000376a 100644 --- a/src/utils/virtfs.cpp +++ b/src/utils/virtfs.cpp @@ -185,9 +185,9 @@ namespace VirtFs return PHYSFS_getLastError(); } - void close(PHYSFS_file *const file) + int close(PHYSFS_file *const file) { - PHYSFS_close(file); + return PHYSFS_close(file); } int64_t read(PHYSFS_File *const file, @@ -198,8 +198,32 @@ namespace VirtFs return PHYSFS_read(file, buffer, objSize, objCount); } + int64_t write(PHYSFS_File *const file, + const void *const buffer, + const uint32_t objSize, + const uint32_t objCount) + { + return PHYSFS_write(file, buffer, objSize, objCount); + } + int64_t fileLength(PHYSFS_File *const file) { return PHYSFS_fileLength(file); } + + int64_t tell(PHYSFS_File *const file) + { + return PHYSFS_tell(file); + } + + int seek(PHYSFS_File *const file, + const uint64_t pos) + { + return PHYSFS_seek(file, pos); + } + + int eof(PHYSFS_File *const file) + { + return PHYSFS_eof(file); + } } // namespace PhysFs -- cgit v1.2.3-70-g09d2