mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-02 00:57:28 -04:00
21 lines
477 B
C++
21 lines
477 B
C++
#include <QtCore>
|
|
|
|
#include "utils.h"
|
|
|
|
bool fileExists(QString path) {
|
|
QFileInfo check_file(path);
|
|
if (check_file.exists() && check_file.isFile())
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
QString getAccountName(){
|
|
QString accountName = qgetenv("USER"); // mac/linux
|
|
if (accountName.isEmpty())
|
|
accountName = qgetenv("USERNAME"); // Windows
|
|
if (accountName.isEmpty())
|
|
accountName = "My monero Account";
|
|
return accountName;
|
|
}
|