summaryrefslogtreecommitdiff
path: root/zen/file_io_base.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2015-10-02 14:55:19 +0200
committerDaniel Wilhelm <daniel@wili.li>2015-10-02 14:55:19 +0200
commit46fc289a8776ba253e97d01d6948fb1031ea1973 (patch)
treeb16a99c60f21b04c001f29862bf2ee16ae3a0e00 /zen/file_io_base.h
parent6.15 (diff)
downloadFreeFileSync-46fc289a8776ba253e97d01d6948fb1031ea1973.tar.gz
FreeFileSync-46fc289a8776ba253e97d01d6948fb1031ea1973.tar.bz2
FreeFileSync-46fc289a8776ba253e97d01d6948fb1031ea1973.zip
7.0
Diffstat (limited to 'zen/file_io_base.h')
-rw-r--r--zen/file_io_base.h64
1 files changed, 0 insertions, 64 deletions
diff --git a/zen/file_io_base.h b/zen/file_io_base.h
deleted file mode 100644
index 9b6b27ca..00000000
--- a/zen/file_io_base.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// **************************************************************************
-// * This file is part of the FreeFileSync project. It is distributed under *
-// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 *
-// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
-// **************************************************************************
-
-#ifndef FILEIO_BASE_H_INCLUDED_23432431789615314
-#define FILEIO_BASE_H_INCLUDED_23432431789615314
-
-#include "zstring.h"
-
-namespace zen
-{
-class FileBase
-{
-public:
- const Zstring& getFilename() const { return filename_; }
-
-protected:
- FileBase(const Zstring& filename) : filename_(filename) {}
- ~FileBase() {}
-
-private:
- FileBase (const FileBase&) = delete;
- FileBase& operator=(const FileBase&) = delete;
-
- const Zstring filename_;
-};
-
-
-class FileInputBase : public FileBase
-{
-public:
- virtual size_t read(void* buffer, size_t bytesToRead) = 0; //throw FileError; returns actual number of bytes read
- bool eof() const { return eofReached; } //end of file reached
-
-protected:
- FileInputBase(const Zstring& filename) : FileBase(filename), eofReached(false) {}
- ~FileInputBase() {}
- void setEof() { eofReached = true; }
-
-private:
- bool eofReached;
-};
-
-
-class FileOutputBase : public FileBase
-{
-public:
- enum AccessFlag
- {
- ACC_OVERWRITE,
- ACC_CREATE_NEW
- };
- virtual void write(const void* buffer, size_t bytesToWrite) = 0; //throw FileError
-
-protected:
- FileOutputBase(const Zstring& filename) : FileBase(filename) {}
- ~FileOutputBase() {}
-};
-
-}
-
-#endif //FILEIO_BASE_H_INCLUDED_23432431789615314
bgstack15