feat(PluginManager): add DeleteConfiguration() and UI

This commit is contained in:
goat 2021-07-16 22:57:41 +02:00
parent 68142da426
commit 9759ac6d11
No known key found for this signature in database
GPG key ID: F18F057873895461
3 changed files with 66 additions and 1 deletions

View file

@ -60,6 +60,22 @@ namespace Dalamud.Configuration
});
}
/// <summary>
/// Delete the configuration file and folder for the specified plugin.
/// This will throw an <see cref="IOException"/> if the plugin did not correctly close its handles.
/// </summary>
/// <param name="pluginName">The name of the plugin.</param>
public void Delete(string pluginName)
{
var directory = this.GetDirectoryPath(pluginName);
if (directory.Exists)
directory.Delete(true);
var file = this.GetConfigFile(pluginName);
if (file.Exists)
file.Delete();
}
/// <summary>
/// Get plugin directory.
/// </summary>