CODE |
// Write out the file string dirname; if (System.IO.Directory.Exists(DefsDir) == true) { // put it in the defaults directory if it exists dirname = String.Format("{0}/{1}.npc", DefsDir, filename); } else { // otherwise just put it in the main installation dir dirname = String.Format("{0}.npc", filename); } // check to see if the file already exists if (System.IO.File.Exists(dirname) == true) { // prompt the user to save over it if (from != null) { from.SendGump(new ConfirmSaveGump(this, ds, dirname, filename, updateconfig)); } } else { SaveFile(from, ds, dirname, filename, updateconfig); } } |