src/sgp/FileMan.cc
/** Find config folder and switch into it. */
Find config folder and switch into it.
Find config folder and switch into it .
std::string FileMan::switchTmpFolder(std::string home)
{
	std::string tmpPath = FileMan::joinPaths(home, LOCAL_CURRENT_DIR);
	if (mkdir(tmpPath.c_str(), 0700) != 0 && errno != EEXIST)
	{
		SLOGE("Unable to create tmp directory '%s'", tmpPath.c_str());
		throw std::runtime_error("Unable to create tmp directory");
	}
	else
	{
		SetFileManCurrentDirectory(tmpPath.c_str());
	}
	return home;
}
std :: string FileMan :: switchTmpFolder ( std :: string home ) { std :: string tmpPath = FileMan :: joinPaths ( home , LOCAL_CURRENT_DIR ) ; if ( mkdir ( tmpPath . c_str ( ) , 0700 ) != 0 && errno != EEXIST ) { SLOGE ( " " , tmpPath . c_str ( ) ) ; throw std :: runtime_error ( " " ) ; } else { SetFileManCurrentDirectory ( tmpPath . c_str ( ) ) ; } return home ; }
Find config folder and switch into it.
Find config folder and switch into it .
// Create another directory and set is as the current directory for the process // Temporary files will be created in this directory. // ----------------------------------------------------------------------------