ewmscp
..
|
#include <inputHandlerPosixFile.h>
Public Member Functions | |
readerPosixFile (const std::string &aPath, copyRequest::stateType &state, const genericStat &inititalStat) | |
~readerPosixFile () override | |
bool | parallelizable () const override |
tell if this handler is capable of parallel IO. Unsually not the case More... | |
bool | setupSparseRegions (const std::string &sparseHandling) override |
create a region list which maps the holes in the source file More... | |
void | seek (size_t pos) override |
like the standard seek, to be used only when appending new data to a file More... | |
bool | readBlock (block &b) override |
read one block from the file More... | |
void | readBlockP (block &b, size_t bytesToRead, off_t offset) override |
read one block from the file, starting at offset. More... | |
void | checkUnchangedness () override |
check if the file is unchanged by comparing cuttent stat to initial stat More... | |
![]() | |
virtual | ~reader () noexcept(false)=default |
![]() | |
ioHandle () | |
virtual | ~ioHandle () noexcept(false) |
virtual size_t | getBlockSize () const |
virtual void | setBlockSize (size_t newSize) |
virtual std::unique_ptr< acl::list > | getAclData () |
get acls More... | |
![]() | |
posixFileIoCommon (const std::string &aPath) | |
void | setXattr (const std::string &name, const std::string &value) override |
std::string | getXattr (const std::string &name) override |
get one extended attribute value More... | |
void | removeXattr (const std::string &name) override |
std::unique_ptr< const genericStat > | getStat () override |
std::unique_ptr< ioHandle::attrDataType > | getAttrData (const outputHandler::base *aOutputHandler) override |
get attributes in the optimal way for setting with aOutputHandler More... | |
Protected Attributes | |
std::deque< regionType > | regions |
![]() | |
const genericStat & | readInitialStat |
stat at beginning, needed for unchngedness check More... | |
std::remove_const< decltype(readInitialStat.size)>::type | totalBytesRead = 0 |
number of bytes read so far, needed for check on growing files More... | |
![]() | |
size_t | blockSize |
in bytes, block size to be used when reading or writing More... | |
![]() | |
const std::string & | path |
int | fd = -1 |
Additional Inherited Members | |
![]() | |
reader (const genericStat &inititalStat) | |
![]() | |
unwindCheck ()=default | |
~unwindCheck ()=default | |
bool | isUnwinding () const |
![]() | |
ioHandle () | |
virtual | ~ioHandle () noexcept(false) |
virtual size_t | getBlockSize () const |
virtual void | setBlockSize (size_t newSize) |
virtual std::unique_ptr< acl::list > | getAclData () |
get acls More... | |
Definition at line 44 of file inputHandlerPosixFile.h.
inputHandler::posixFile::readerPosixFile::readerPosixFile | ( | const std::string & | aPath, |
copyRequest::stateType & | state, | ||
const genericStat & | inititalStat | ||
) |
Definition at line 44 of file inputHandlerPosixFile.cpp.
References throwcall::badval(), genericStat::blksize, ioHandle::blockSize, posixFileIoCommon::fd, throwcall::good0(), genericStat::mode, posixFileIoCommon::path, inputHandler::base::reader::readInitialStat, timerInst, and copyRequest::vanished.
|
override |
Definition at line 73 of file inputHandlerPosixFile.cpp.
References errMsg::debug, errMsg::emit(), throwcall::good0(), inputHandler::posixFile::preserveAtime, and timerInst.
|
overridevirtual |
check if the file is unchanged by comparing cuttent stat to initial stat
delayAdvisingError | if file has changed according to size of mtime |
std::system_error | if stat fails |
Implements inputHandler::base::reader.
Definition at line 252 of file inputHandlerPosixFile.cpp.
References genericStat::getMtime(), throwcall::good0(), genericStat::isSameMtimeAs(), genericStat::size, and timerInst.
|
overridevirtual |
tell if this handler is capable of parallel IO. Unsually not the case
Reimplemented from ioHandle.
Definition at line 151 of file inputHandlerPosixFile.cpp.
|
overridevirtual |
read one block from the file
std::system_error | if read fails |
delayAdvisingError | if file changes during reading |
Implements inputHandler::base::reader.
Definition at line 154 of file inputHandlerPosixFile.cpp.
References throwcall::badval(), block::bufferAt(), block::bump_size(), block::clear(), block::max_size(), readRateLimit, block::setHoleState(), block::size(), timerInst, throttle::watch::update(), and throttle::watch::wait().
Referenced by inputHandler::Gpfs::readerGpfs::readBlock().
|
overridevirtual |
read one block from the file, starting at offset.
meant for pparallel reading, often not implemented only for non-sparse files
std::system_error | if read fails |
delayAdvisingError | if file changes during reading |
std::logic_error | if attempted on sparse file |
Reimplemented from inputHandler::base::reader.
Definition at line 226 of file inputHandlerPosixFile.cpp.
References throwcall::badval(), block::bufferAt(), block::bump_size(), block::clear(), block::max_size(), block::size(), and timerInst.
Referenced by inputHandler::Gpfs::readerGpfs::readBlockP().
|
overridevirtual |
like the standard seek, to be used only when appending new data to a file
std::system_error | if seek fails |
unimplementedActionError | if seek is not implemented (most input handlers) |
Reimplemented from inputHandler::base::reader.
Definition at line 139 of file inputHandlerPosixFile.cpp.
References throwcall::badval().
|
overridevirtual |
create a region list which maps the holes in the source file
Reimplemented from inputHandler::base::reader.
Definition at line 103 of file inputHandlerPosixFile.cpp.
References throwcall::badval(), throwcall::good0(), and timerInst.
|
protected |
Definition at line 46 of file inputHandlerPosixFile.h.