diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2018-05-09 00:01:58 +0200 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2018-05-09 00:01:58 +0200 |
commit | 725e6e3c8e52ede0edec0fa15da3f148bb2f7d74 (patch) | |
tree | 739061fe661dc0bd1d200b0378365f3f47ff78be /zen/file_io.h | |
parent | 9.3 (diff) | |
download | FreeFileSync-725e6e3c8e52ede0edec0fa15da3f148bb2f7d74.tar.gz FreeFileSync-725e6e3c8e52ede0edec0fa15da3f148bb2f7d74.tar.bz2 FreeFileSync-725e6e3c8e52ede0edec0fa15da3f148bb2f7d74.zip |
9.4
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 |