File indexing completed on 2024-05-05 05:48:39
0001 /* 0002 SPDX-FileCopyrightText: 2008 Volker Lanz <vl@fidra.de> 0003 SPDX-FileCopyrightText: 2014-2018 Andrius Štikonas <andrius@stikonas.eu> 0004 0005 SPDX-License-Identifier: GPL-3.0-or-later 0006 */ 0007 0008 #include "core/copytargetfile.h" 0009 0010 /** Constructs a file to write to. 0011 @param filename name of the file to write to 0012 */ 0013 CopyTargetFile::CopyTargetFile(const QString& filename) : 0014 CopyTarget(), 0015 m_File(filename) 0016 { 0017 } 0018 0019 /** Opens the file for writing. 0020 @return true on success 0021 */ 0022 bool CopyTargetFile::open() 0023 { 0024 return file().open(QIODevice::WriteOnly | QIODevice::Truncate); 0025 }