kpmcore/src/core/copytargetfile.cpp

26 lines
577 B
C++
Raw Normal View History

/*
SPDX-FileCopyrightText: 2008 Volker Lanz <vl@fidra.de>
SPDX-FileCopyrightText: 2014-2018 Andrius Štikonas <andrius@stikonas.eu>
SPDX-License-Identifier: GPL-3.0-or-later
*/
#include "core/copytargetfile.h"
/** Constructs a file to write to.
2015-07-13 15:16:36 +01:00
@param filename name of the file to write to
*/
CopyTargetFile::CopyTargetFile(const QString& filename) :
2015-07-13 15:16:36 +01:00
CopyTarget(),
m_File(filename)
{
}
/** Opens the file for writing.
2015-07-13 15:16:36 +01:00
@return true on success
*/
bool CopyTargetFile::open()
{
2015-07-13 15:16:36 +01:00
return file().open(QIODevice::WriteOnly | QIODevice::Truncate);
}