diff options
Diffstat (limited to 'lib/CopyJob.cc')
-rw-r--r-- | lib/CopyJob.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/CopyJob.cc b/lib/CopyJob.cc index e69de29..7dccbc5 100644 --- a/lib/CopyJob.cc +++ b/lib/CopyJob.cc @@ -0,0 +1,15 @@ +#include "CopyJob.h" + +CopyJob::CopyJob(Handle & as, Handle & ad) : s(as), d(ad) { } + +CopyJob::~CopyJob() { } + +int CopyJob::Do() { + int r; + char buffer[4096]; + + while (!s.IsClosed()) { + r = s.read(buffer, 4096); + d.write(buffer, r); + } +} |