Files
pilotclient/src/blackmisc/fileutilities.h
Klaus Basan a725ce2181 refs #478 refs #488, utils / free functions
* seed for random numbers per thread
* added function to get all user metatypes as string
* added new read file function per path/name
* removed DBus operators for pixmap
* JSON operators for byte array
* util function for JSON string
2015-11-19 21:03:23 +00:00

46 lines
1.4 KiB
C++

/* Copyright (C) 2015
* swift project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKMISC_CFILEUTILITIES_H
#define BLACKMISC_CFILEUTILITIES_H
#include "blackmiscexport.h"
#include <QObject>
#include <QDebug>
namespace BlackMisc
{
/*!
* Utility class for file operations
*/
class BLACKMISC_EXPORT CFileUtils
{
public:
//! Write string to text file
static bool writeStringToFile(const QString &content, const QString &fileNameAndPath);
//! Read file into string
static QString readFileToString(const QString &fileNameAndPath);
//! Read file into string
static QString readFileToString(const QString &filePath, const QString &fileName);
//! Write string to text file in background
static bool writeStringToFileInBackground(const QString &content, const QString &fileNameAndPath);
//! Append file paths
//! \sa CNetworkUtils::buildUrl for URLs
static QString appendFilePaths(const QString &path1, const QString &path2);
};
} // ns
#endif // guard