12#include <config_folders.h>
14#include <osl/file.hxx>
15#include <rtl/bootstrap.hxx>
24 if (safeModeFile.open(osl_File_OpenFlag_Create) == FileBase::E_None)
34 if (safeModeFile.open(osl_File_OpenFlag_Read) == FileBase::E_None)
46 if (restartFile.open(osl_File_OpenFlag_Create) == FileBase::E_None)
56 if (restartFile.open(osl_File_OpenFlag_Read) == FileBase::E_None)
65 return File::remove(
getFilePath(
"safemode_restart")) == FileBase::E_None;
70 OUString url(
"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
72 rtl::Bootstrap::expandMacros(url);
74 OUString aProfilePath;
75 FileBase::getSystemPathFromFileURL(url, aProfilePath);
76 (void)FileBase::getAbsoluteFileURL(url, sFilename, aProfilePath);
static bool putFlag()
Write a flag file to the user profile indicating that the next launch should be in safe mode.
static bool removeRestartFlag()
Remove the restart flag file.
static bool putRestartFlag()
Write a flag to the user profile indicating that we are currently restarting from safe mode - that me...
static bool hasFlag()
Check the existence of the safe mode flag file.
static bool hasRestartFlag()
Check the existence of the restart flag file.
static bool removeFlag()
Remove the flag file for the safe mode.
static OUString getFilePath(const OUString &sFilename)
Returns the path of the safe mode flag file.
#define SAL_CONFIGFILE(name)