baseDirectoryFile = new File(homeDirectory, baseDirectory);
}
}
catch (Exception e)
{
throw new ModuleInitializeException
("Failed to create the file config storage.", e);
}
}
if (baseDirectoryFile.exists() == false)
{
if (baseDirectoryFile.mkdirs() == false)
{
throw new ModuleInitializeException
("Unable to create the specified directory.");
}
}
else
{
if (baseDirectoryFile.canRead() == false ||
baseDirectoryFile.canWrite() == false)
{
throw new ModuleInitializeException
("Unable to access the specified directory.");
}
}
return baseDirectoryFile;
}