![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
Implementation of global system helpers. More...
#include <CSystem.h>
Classes | |
struct | FileDriveDescriptor |
struct | FileDriveInfo |
Public Types | |
typedef QMap< QString, QString > | EnvironmentVariables |
Static Public Member Functions | |
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 | GetNormalizedPath (const QString &path) |
Get normalized path with enrolled system variables. | |
static QString | GetVariableValue (const QString &varName, bool envVars=true, bool embeddedVars=true) |
Get value of system variables. | |
static QString | GetEnrolledPath (const QString &path, bool envVars=true, bool embeddedVars=true) |
Get path with enrolled system variables. | |
static EnvironmentVariables | GetEnvironmentVariables () |
Get list of environment valiables related to the current process. | |
static void | SetTempDirectoryPath (const QString &tempPath) |
Set path for for temporary data to the current process. | |
static bool | CopyDirectory (const QString &srcPath, const QString &dstPath) |
Copy files and directories from one folder to another. | |
static bool | RemoveDirectory (const QString &directoryPath) |
Remove a given directory with all contents. | |
static bool | FileCopy (const QString &source, const QString &result, bool overWrite=false) |
Copy file to directory. | |
static bool | FileMove (const QString &source, const QString &targetFolder, bool overWrite=false) |
Move a file to another directory. | |
static bool | EnsurePathExists (const QString &filePath) |
Ensure that the given path exists. | |
static QString | GetCurrentUserName () |
Get the name of the currently logged user. | |
static FileDriveInfo | GetFileDriveInfo (const QString &fileDrivePath) |
Get the free space information for the given file drive. | |
static QString | GetCompilerVariable (const QString &varName) |
Get compiler specific variable. | |
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. | |
QMap<QString, QString> istd::CSystem::EnvironmentVariables |
|
static |
Make a valid file name from a string.
All not allowed characters in the fileNameString
will be replaced by a valid symbol defined in c\replacingChar or removed if this parameter is not set.
fileNameString | Input string representing the file name |
fileName | Resulting file name if the conversion was successful. |
true
if the operation was successful, otherwise false
.
|
static |
Copy files and directories from one folder to another.
|
static |
Ensure that the given path exists.
Referenced by ifile::TFileSerializerComp< ReadArchive, WriteArchive >::SaveToFile(), and ifile::TXmlFileSerializerComp< ReadArchive, WriteArchive >::SaveToFile().
|
static |
Copy file to directory.
If the target directory doesn't exist, it will be created.
|
static |
Move a file to another directory.
If the target directory doesn't exist, it will be created.
|
static |
Get compiler specific variable.
Please note, that this variable depends only on compiler time state and cannot be set by application. To use 'logical value' of variable you should use GetVariableValue
.
|
static |
Get the name of the currently logged user.
|
static |
Get path with enrolled system variables.
|
static |
Get list of environment valiables related to the current process.
|
static |
Get the free space information for the given file drive.
|
static |
Get normalized path with enrolled system variables.
|
static |
Get the name of the operation system currently used.
|
static |
Get value of system variables.
varName | name of variable. |
envVars | if enabled, the system environment variables will be also considered. |
|
static |
Remove a given directory with all contents.
|
static |
Set path for for temporary data to the current process.
|
static |
Set some user specific variables to override the generated by compiler.
applicationDirPtr | Path to application. |
compilerModePtr | typically is 'Debug' or 'Release'. |
compilerNamePtr | code of compiler, e.g. 'VC12' or 'GCC'. |
platformCodePtr | suffix used typically to differentiate 32 and 64 bit mode - empty for 32 bit and 'x64' for 64 bit mode. |
© Witold Gantzke and Kirill Lepskiy