From 725e6e3c8e52ede0edec0fa15da3f148bb2f7d74 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Wed, 9 May 2018 00:01:58 +0200 Subject: 9.4 --- zen/file_io.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'zen/file_io.h') diff --git a/zen/file_io.h b/zen/file_io.h index 6b0665a1..c2071500 100755 --- a/zen/file_io.h +++ b/zen/file_io.h @@ -33,6 +33,7 @@ public: //Windows: use 64kB ?? https://technet.microsoft.com/en-us/library/cc938632 //Linux: use st_blksize? + //macOS: use f_iosize? static size_t getBlockSize() { return 128 * 1024; }; protected: @@ -58,10 +59,10 @@ public: FileInput(const Zstring& filePath, const IOCallback& notifyUnbufferedIO); //throw FileError, ErrorFileLocked FileInput(FileHandle handle, const Zstring& filePath, const IOCallback& notifyUnbufferedIO); //takes ownership! - size_t read(void* buffer, size_t bytesToRead); //throw FileError, X; return "bytesToRead" bytes unless end of stream! + size_t read(void* buffer, size_t bytesToRead); //throw FileError, ErrorFileLocked, X; return "bytesToRead" bytes unless end of stream! private: - size_t tryRead(void* buffer, size_t bytesToRead); //throw FileError; may return short, only 0 means EOF! => CONTRACT: bytesToRead > 0! + size_t tryRead(void* buffer, size_t bytesToRead); //throw FileError, ErrorFileLocked; may return short, only 0 means EOF! => CONTRACT: bytesToRead > 0! std::vector memBuf_; const IOCallback notifyUnbufferedIO_; //throw X -- cgit