Added new function null_device(), which returns the name of the NULL device (e.g. "/dev/null" or "NUL") for the current platform.

This commit is contained in:
LoRd_MuldeR 2018-10-15 23:22:55 +02:00
parent ce24bd2d05
commit d4146475d9
2 changed files with 14 additions and 0 deletions

View File

@ -264,6 +264,9 @@ namespace MUtils
MUTILS_API QString get_envvar(const QString &name);
MUTILS_API bool set_envvar(const QString &name, const QString &value);
//NULL device
MUTILS_API const QLatin1String &null_device(void);
//Check if debugger is present
MUTILS_API void check_debugger(void);

View File

@ -1789,6 +1789,17 @@ bool MUtils::OS::set_envvar(const QString &name, const QString &value)
return false;
}
///////////////////////////////////////////////////////////////////////////////
// NULL DEVICE
///////////////////////////////////////////////////////////////////////////////
static const QLatin1String NULL_DEVICE("NUL");
const QLatin1String &MUtils::OS::null_device(void)
{
return NULL_DEVICE;
}
///////////////////////////////////////////////////////////////////////////////
// DEBUGGER CHECK
///////////////////////////////////////////////////////////////////////////////