6#ifndef istd_CSystem_included
7#define istd_CSystem_included
11#include <QtCore/QString>
75 static bool ConvertToFileName(
const QString& fileNameString, QString& fileName,
const QString replacingChar = QString());
87 static QString
GetVariableValue(
const QString& varName,
bool envVars =
true,
bool embeddedVars =
true);
92 static QString
GetEnrolledPath(
const QString& path,
bool envVars =
true,
bool embeddedVars =
true);
117 static bool FileCopy(
const QString& source,
const QString& result,
bool overWrite =
false);
122 static bool FileMove(
const QString& source,
const QString& targetFolder,
bool overWrite =
false);
154 const QString* applicationDirPtr =
nullptr,
155 const QString* compilerModePtr =
nullptr,
156 const QString* compilerNamePtr =
nullptr,
157 const QString* platformCodePtr =
nullptr);
160 static QString s_applicationDir;
161 static QString s_compilerMode;
162 static QString s_compilerName;
163 static QString s_platformCode;
Implementation of global system helpers.
static bool FileMove(const QString &source, const QString &targetFolder, bool overWrite=false)
Move a file to another directory.
static QString GetEnrolledPath(const QString &path, bool envVars=true, bool embeddedVars=true)
Get path with enrolled system variables.
static QString GetVariableValue(const QString &varName, bool envVars=true, bool embeddedVars=true)
Get value of system variables.
static void SetUserVariables(const QString *applicationDirPtr=nullptr, const QString *compilerModePtr=nullptr, const QString *compilerNamePtr=nullptr, const QString *platformCodePtr=nullptr)
Set some user specific variables to override the generated by compiler.
static void SetTempDirectoryPath(const QString &tempPath)
Set path for for temporary data to the current process.
static bool EnsurePathExists(const QString &filePath)
Ensure that the given path exists.
static bool RemoveDirectory(const QString &directoryPath)
Remove a given directory with all contents.
static QString GetNormalizedPath(const QString &path)
Get normalized path with enrolled system variables.
static bool FileCopy(const QString &source, const QString &result, bool overWrite=false)
Copy file to directory.
QMap< QString, QString > EnvironmentVariables
static EnvironmentVariables GetEnvironmentVariables()
Get list of environment valiables related to the current process.
static QString GetCurrentUserName()
Get the name of the currently logged user.
static QString GetOperationSystemName()
Get the name of the operation system currently used.
static bool ConvertToFileName(const QString &fileNameString, QString &fileName, const QString replacingChar=QString())
Make a valid file name from a string.
static QString GetCompilerVariable(const QString &varName)
Get compiler specific variable.
static FileDriveInfo GetFileDriveInfo(const QString &fileDrivePath)
Get the free space information for the given file drive.
static bool CopyDirectory(const QString &srcPath, const QString &dstPath)
Copy files and directories from one folder to another.
bool operator==(const FileDriveDescriptor &driveInfo) const
bool operator==(const FileDriveInfo &info) const