 |
ewmscp
..
|
Go to the documentation of this file.
15 return std::unique_ptr<reader>(
new readerDavix(*
this, aPath, state, inititalStat));
26 return std::unique_ptr<Directory>(
new DavixDirectory(path, *
this));
39 if (handler.posix.closedirpp(dir, report)) {
42 path,
"close directory during unwind ",
52 auto entry = handler.posix.readdirpp(dir, &statbuf, report);
53 if (entry ==
nullptr) {
56 auto genstat = std::unique_ptr<const genericStat>(
new genericStat(statbuf, std::chrono::seconds(1)));
57 return std::unique_ptr<Entry>(
new Entry(entry->d_name, genstat));
61 const std::string& aPath,
65 reader(inititalStat) {
69 if (report->getStatus() == Davix::StatusCode::FileNotFound) {
79 if (handler.posix.close(fd, report) != 0) {
82 path,
"close during unwind ",
93 b.
clear(totalBytesRead);
94 bool lastblock =
false;
99 auto bytes_read = handler.posix.read(fd, b.
bufferAt(b.
size()), blockSize, report);
100 if (bytes_read < 0) {
103 if (bytes_read == 0) {
105 if (totalBytesRead < readInitialStat.size) {
107 std::to_string(readInitialStat.size) +
109 std::to_string(totalBytesRead) +
115 totalBytesRead += bytes_read;
116 if (totalBytesRead > readInitialStat.size) {
118 std::to_string(readInitialStat.size) +
120 std::to_string(totalBytesRead) +
138 auto bytes_read = handler.posix.pread64(fd, b.
bufferAt(b.
size()), blockSize, offset + b.
size(),report);
141 if (bytes_read == 0) {
145 if (b.
size() > bytesToRead) {
149 if (b.
size() < bytesToRead) {
151 + std::to_string(bytesToRead)
153 + std::to_string(b.
size()));
class for exceptions that advise for delays Exceptions of this kind are to be thrown when circumstanc...
class for defining the location of a error message in the source code.
generic stat abstraction class Used to abstract the variants of the stat structure.
void bump_size(size_t additionalBytes)
throttle::watch readRateLimit
size_t blockSize
in bytes, block size to be used when reading or writing
void * bufferAt(size_t offset)
only way to access the data in the block
class for easy error handling with davix ensures proper cleanup of the error report when going out of...
data block, used to hold the data that are being copied (or checksummed).
void emit(level aLogLevel, const location &loc, const std::string &aObject, const std::string &aAction, const Args &... args)
function to create and enqueue a message, this is the only way that messages should be created!
#define timerInst(subfunc)
void clear(size_t aOffset)
Davix::RequestParams params
const std::string & getMessage() const
void update(double units=1.0)
class for configuring one davix instance holds all options necessary for that