diff options
Diffstat (limited to 'zen/file_io.h')
-rwxr-xr-x | zen/file_io.h | 5 |
1 files changed, 3 insertions, 2 deletions
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<char> memBuf_; const IOCallback notifyUnbufferedIO_; //throw X |