/* */ #include "AbstractSingleDiskAdaptor.h" #include "File.h" void AbstractSingleDiskAdaptor::initAndOpenFile() { diskWriter->initAndOpenFile(getFilePath(), totalLength); } void AbstractSingleDiskAdaptor::openFile() { diskWriter->openFile(getFilePath(), totalLength); } void AbstractSingleDiskAdaptor::closeFile() { diskWriter->closeFile(); } void AbstractSingleDiskAdaptor::openExistingFile() { diskWriter->openExistingFile(getFilePath()); } void AbstractSingleDiskAdaptor::writeData(const unsigned char* data, uint32_t len, int64_t offset) { diskWriter->writeData(data, len, offset); } int AbstractSingleDiskAdaptor::readData(unsigned char* data, uint32_t len, int64_t offset) { return diskWriter->readData(data, len, offset); } string AbstractSingleDiskAdaptor::sha1Sum(int64_t offset, uint64_t length) { return diskWriter->sha1Sum(offset, length); } bool AbstractSingleDiskAdaptor::fileExists() { return File(getFilePath()).exists(); }