1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-07 04:10:08 +00:00

Added a PropertiesFile::reload() method.

This commit is contained in:
jules 2012-11-02 16:58:13 +00:00
parent 793fec6592
commit 8a3298ebb8
4 changed files with 11 additions and 14 deletions

View file

@ -108,7 +108,7 @@ PropertiesFile::PropertiesFile (const File& f, const Options& o)
file (f), options (o),
loadedOk (false), needsWriting (false)
{
initialise();
reload();
}
PropertiesFile::PropertiesFile (const Options& o)
@ -116,17 +116,18 @@ PropertiesFile::PropertiesFile (const Options& o)
file (o.getDefaultFile()), options (o),
loadedOk (false), needsWriting (false)
{
initialise();
reload();
}
void PropertiesFile::initialise()
bool PropertiesFile::reload()
{
ProcessScopedLock pl (createProcessLock());
if (pl != nullptr && ! pl->isLocked())
return; // locking failure..
return false; // locking failure..
loadedOk = (! file.exists()) || loadAsBinary() || loadAsXml();
return loadedOk;
}
PropertiesFile::~PropertiesFile()