diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:35 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:35 +0200 |
commit | 460091fb0b2ff114cc741372f15bb43b702ea3b1 (patch) | |
tree | 0562c2eda4c66969c6e6d0910080db9f5b0def3e /zen/file_io.h | |
parent | 5.15 (diff) | |
download | FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.tar.gz FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.tar.bz2 FreeFileSync-460091fb0b2ff114cc741372f15bb43b702ea3b1.zip |
5.16
Diffstat (limited to 'zen/file_io.h')
-rw-r--r-- | zen/file_io.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/zen/file_io.h b/zen/file_io.h index 8e501172..407109f7 100644 --- a/zen/file_io.h +++ b/zen/file_io.h @@ -4,8 +4,8 @@ // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** -#ifndef FILEIO_H_INCLUDED -#define FILEIO_H_INCLUDED +#ifndef FILEIO_89578342758342572345 +#define FILEIO_89578342758342572345 #include "file_io_base.h" #include "file_error.h" @@ -73,7 +73,7 @@ public: //considering safe-read.c it seems buffer size should be a multiple of 8192 virtual size_t read(void* buffer, size_t bytesToRead); //throw FileError; returns actual number of bytes read - //we should not rely on buffer being filled completely! + //do NOT rely on partially filled buffer meaning EOF! int getDescriptor() { return fdFile;} @@ -86,6 +86,7 @@ class FileOutputUnbuffered : public FileOutputBase public: //creates a new file (no overwrite allowed!) FileOutputUnbuffered(const Zstring& filename, mode_t mode); //throw FileError, ErrorTargetPathMissing, ErrorTargetExisting + FileOutputUnbuffered(int fd, const Zstring& filename); //takes ownership! ~FileOutputUnbuffered(); virtual void write(const void* buffer, size_t bytesToWrite); //throw FileError @@ -97,4 +98,4 @@ private: #endif } -#endif // FILEIO_H_INCLUDED +#endif //FILEIO_89578342758342572345 |