summaryrefslogtreecommitdiff
path: root/zen/file_io.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2015-10-02 14:52:04 +0200
committerDaniel Wilhelm <daniel@wili.li>2015-10-02 14:52:04 +0200
commit1845c028b8cb8496d1d78f0da738120e1c31401a (patch)
treeadf9fb436aea09be367aef8ed3b6cdbf6a46e34c /zen/file_io.h
parent6.7 (diff)
downloadFreeFileSync-1845c028b8cb8496d1d78f0da738120e1c31401a.tar.gz
FreeFileSync-1845c028b8cb8496d1d78f0da738120e1c31401a.tar.bz2
FreeFileSync-1845c028b8cb8496d1d78f0da738120e1c31401a.zip
6.8
Diffstat (limited to 'zen/file_io.h')
-rw-r--r--zen/file_io.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/zen/file_io.h b/zen/file_io.h
index 2e9e828e..5ae6eb1c 100644
--- a/zen/file_io.h
+++ b/zen/file_io.h
@@ -37,11 +37,11 @@ typedef FILE* FileHandle;
class FileInput : public FileInputBase
{
public:
- FileInput(const Zstring& filename); //throw FileError
- FileInput(FileHandle handle, const Zstring& filename); //takes ownership!
+ FileInput(const Zstring& filepath); //throw FileError
+ FileInput(FileHandle handle, const Zstring& filepath); //takes ownership!
~FileInput();
- virtual size_t read(void* buffer, size_t bytesToRead); //throw FileError; returns actual number of bytes read
+ virtual size_t read(void* buffer, size_t bytesToRead) override; //throw FileError; returns actual number of bytes read
//expected to fill buffer completely unless "end of file"
private:
@@ -52,11 +52,11 @@ private:
class FileOutput : public FileOutputBase
{
public:
- FileOutput(const Zstring& filename, AccessFlag access); //throw FileError, ErrorTargetPathMissing, ErrorTargetExisting
- FileOutput(FileHandle handle, const Zstring& filename); //takes ownership!
+ FileOutput(const Zstring& filepath, AccessFlag access); //throw FileError, ErrorTargetPathMissing, ErrorTargetExisting
+ FileOutput(FileHandle handle, const Zstring& filepath); //takes ownership!
~FileOutput();
- virtual void write(const void* buffer, size_t bytesToWrite); //throw FileError
+ virtual void write(const void* buffer, size_t bytesToWrite) override; //throw FileError
private:
FileHandle fileHandle;
@@ -66,11 +66,11 @@ private:
class FileInputUnbuffered : public FileInputBase
{
public:
- FileInputUnbuffered(const Zstring& filename); //throw FileError
+ FileInputUnbuffered(const Zstring& filepath); //throw FileError
~FileInputUnbuffered();
//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
+ virtual size_t read(void* buffer, size_t bytesToRead) override; //throw FileError; returns actual number of bytes read
//do NOT rely on partially filled buffer meaning EOF!
int getDescriptor() { return fdFile;}
@@ -83,11 +83,11 @@ 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(const Zstring& filepath, mode_t mode); //throw FileError, ErrorTargetPathMissing, ErrorTargetExisting
+ FileOutputUnbuffered(int fd, const Zstring& filepath); //takes ownership!
~FileOutputUnbuffered();
- virtual void write(const void* buffer, size_t bytesToWrite); //throw FileError
+ virtual void write(const void* buffer, size_t bytesToWrite) override; //throw FileError
int getDescriptor() { return fdFile;}
private:
bgstack15