summaryrefslogtreecommitdiff
path: root/zen/file_io.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2019-01-16 00:44:17 +0000
committerDaniel Wilhelm <shieldwed@outlook.com>2019-01-16 00:44:17 +0000
commitc03ea582bff36fe020af1aa329b34f3e6d580f92 (patch)
tree41b8a3085df4de883f2993773b138f1436e041a4 /zen/file_io.h
parentMerge branch '10.7' into 'master' (diff)
parent10.8 (diff)
downloadFreeFileSync-c03ea582bff36fe020af1aa329b34f3e6d580f92.tar.gz
FreeFileSync-c03ea582bff36fe020af1aa329b34f3e6d580f92.tar.bz2
FreeFileSync-c03ea582bff36fe020af1aa329b34f3e6d580f92.zip
Merge branch '10.8' into 'master'10.8
10.8 See merge request opensource-tracking/FreeFileSync!5
Diffstat (limited to 'zen/file_io.h')
-rwxr-xr-xzen/file_io.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/zen/file_io.h b/zen/file_io.h
index d05d97db..bf23d22c 100755
--- a/zen/file_io.h
+++ b/zen/file_io.h
@@ -56,8 +56,8 @@ private:
class FileInput : public FileBase
{
public:
- FileInput(const Zstring& filePath, const IOCallback& notifyUnbufferedIO); //throw FileError, ErrorFileLocked
- FileInput(FileHandle handle, const Zstring& filePath, const IOCallback& notifyUnbufferedIO); //takes ownership!
+ FileInput( const Zstring& filePath, const IOCallback& notifyUnbufferedIO /*throw X*/); //throw FileError, ErrorFileLocked
+ FileInput(FileHandle handle, const Zstring& filePath, const IOCallback& notifyUnbufferedIO /*throw X*/); //takes ownership!
size_t read(void* buffer, size_t bytesToRead); //throw FileError, ErrorFileLocked, X; return "bytesToRead" bytes unless end of stream!
@@ -80,8 +80,8 @@ public:
ACC_OVERWRITE,
ACC_CREATE_NEW
};
- FileOutput(const Zstring& filePath, AccessFlag access, const IOCallback& notifyUnbufferedIO); //throw FileError, ErrorTargetExisting
- FileOutput(FileHandle handle, const Zstring& filePath, const IOCallback& notifyUnbufferedIO); //takes ownership!
+ FileOutput(AccessFlag access, const Zstring& filePath, const IOCallback& notifyUnbufferedIO /*throw X*/); //throw FileError, ErrorTargetExisting
+ FileOutput(FileHandle handle, const Zstring& filePath, const IOCallback& notifyUnbufferedIO /*throw X*/); //takes ownership!
~FileOutput();
void preAllocateSpaceBestEffort(uint64_t expectedSize); //throw FileError
@@ -105,8 +105,7 @@ private:
//native stream I/O convenience functions:
template <class BinContainer> inline
-BinContainer loadBinContainer(const Zstring& filePath, //throw FileError
- const IOCallback& notifyUnbufferedIO)
+BinContainer loadBinContainer(const Zstring& filePath, const IOCallback& notifyUnbufferedIO /*throw X*/) //throw FileError, X
{
FileInput streamIn(filePath, notifyUnbufferedIO); //throw FileError, ErrorFileLocked
return bufferedLoad<BinContainer>(streamIn); //throw FileError, X;
@@ -114,10 +113,9 @@ BinContainer loadBinContainer(const Zstring& filePath, //throw FileError
template <class BinContainer> inline
-void saveBinContainer(const Zstring& filePath, const BinContainer& buffer, //throw FileError
- const IOCallback& notifyUnbufferedIO)
+void saveBinContainer(const Zstring& filePath, const BinContainer& buffer, const IOCallback& notifyUnbufferedIO /*throw X*/) //throw FileError, X
{
- FileOutput fileOut(filePath, FileOutput::ACC_OVERWRITE, notifyUnbufferedIO); //throw FileError, (ErrorTargetExisting)
+ FileOutput fileOut(FileOutput::ACC_OVERWRITE, filePath, notifyUnbufferedIO); //throw FileError, (ErrorTargetExisting)
if (!buffer.empty())
{
/*snake oil?*/ fileOut.preAllocateSpaceBestEffort(buffer.size()); //throw FileError
bgstack15