MythTV  master
MythFile Namespace Reference


MBASE_PUBLIC long long copy (QFile &dst, QFile &src, uint block_size=0)
 Copies src file to dst file. More...

Function Documentation

◆ copy()

long long MythFile::copy ( QFile &  dst,
QFile &  src,
uint  block_size = 0 

Copies src file to dst file.

If the dst file is open, it must be open for writing. If the src file is open, if must be open for reading.

The files will be in the same open or close state after this function runs as they were prior to this function being called.

This function does not care if the files are actual files. For compatibility with pipes and socket streams the file location will not be reset to 0 at the end of this function. If the function is successful the file pointers will be at the end of the copied data.

dstDestination QFile
srcSource QFile
block_sizeOptional block size in bytes, must be at least 1024, otherwise the default of 16 KB will be used.
bytes copied on success, -1 on failure.

Definition at line 263 of file mythmiscutil.cpp.

Referenced by MythNVDECInterop::Acquire(), TeletextReader::AddPageHeader(), TeletextReader::AddTeletextData(), RTjpeg::bcomp(), GalleryThumbView::Copy(), ImportMusicDialog::copyFile(), mythburn::copyRemote(), ProgramAssociationTable::CreateBlank(), ProgramMapTable::CreateBlank(), MythRAOPConnection::decodeAudioPacket(), mythburn::doProcessFile(), mythburn::doProcessFileProjectX(), MythRenderOpenGL::DrawBitmap(), dvb_decode_text(), MythDVDBuffer::GetChapterTimes(), Jitterometer::GetCPUStat(), mythburn::getFileInformation(), ProgramInfoCache::GetOrdered(), MythVAAPIInteropDRM::GetReferenceFrames(), MythVTBSurfaceInterop::GetReferenceFrames(), nv_python_libs.common.common_api.Common::getUrlData(), HLSStream::HLSStream(), TSPacket::InitPayload(), ImportRecorder::Open(), mythburn::preProcessFile(), ChannelImporter::Process(), MythRAOPConnection::ProcessRequest(), AudioOutputNULL::readOutputData(), MythDVDBuffer::SafeRead(), nv_python_libs.xsltfunctions.traileraddicts_api.xpathFunctions::traileraddictsLinkGenerationMovie(), ThumbFinder::updateThumb(), and NuppelVideoRecorder::WriteFileHeader().