Would it be possible to create a button that when clicked it wipes the entire server?
All information for the server is located under the "\ConanSandbox\Saved\" folders in the root directory of the server.
I don't know if this will help you out but I made a similar code for a program before but I've altered it a little to just give you an idea:
Obviously the serverDirectory variable would be whatever you use to save the server location and you would just set the button event onClick and link to this.
Lemme know if this helps at all!
All information for the server is located under the "\ConanSandbox\Saved\" folders in the root directory of the server.
I don't know if this will help you out but I made a similar code for a program before but I've altered it a little to just give you an idea:
private void wipeDirectory_OnClick(object sender, MouseEventArgs e)
MessageBoxButtons.YesNo,
MessageBoxIcon.Warning
if (dialogResult == DialogResult.Yes)
}
If this code works for you feel free but I was really just posting it so you can get a better understanding of what I was thinking. Sometimes code speaking code is easier than words! {
DialogResult dialogResult =
MessageBox.Show("You are about to erase " + serverDirectory + "\ConanSandbox\Saved\", "Wipe Server",DialogResult dialogResult =
MessageBoxButtons.YesNo,
MessageBoxIcon.Warning
if (dialogResult == DialogResult.Yes)
{
Array.ForEach(Directory.GetFiles(@serverDirectory + "\ConanSandbox\Saved\"),
delegate(string path) { File.Delete(path); });
}Array.ForEach(Directory.GetFiles(@serverDirectory + "\ConanSandbox\Saved\"),
delegate(string path) { File.Delete(path); });
Obviously the serverDirectory variable would be whatever you use to save the server location and you would just set the button event onClick and link to this.
Lemme know if this helps at all!