MCPcopy Create free account
hub / github.com/KDE/kdiff3 / readFile

Method readFile

src/fileaccess.cpp:812–837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

810}
811
812bool FileAccess::readFile(void* pDestBuffer, qint64 maxLength)
813{
814 bool success = false;
815
816 setStatusText("");
817 //Avoid hang on linux for special files.
818 if(!isNormal())
819 return true;
820
821 if(isLocal() || !m_localCopy.isEmpty())
822 {
823 if(open(QIODevice::ReadOnly))
824 {
825 success = interruptableReadFile(pDestBuffer, maxLength); // maxLength == f.read( (char*)pDestBuffer, maxLength )
826 close();
827 }
828 }
829 else
830 {
831 success = mJobHandler->get(pDestBuffer, maxLength);
832 close();
833 }
834
835 assert((realFile == nullptr || !realFile->isOpen()) && !tmpFile->isOpen());
836 return success;
837}
838
839bool FileAccess::writeFile(const void* pSrcBuffer, qint64 length)
840{

Callers

nothing calls this directly

Calls 2

isEmptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected