ID:167005
 
Is there any way to delete a particular directory within a savefile?

example:
mob/proc/Delete()
var/savefile/F = new("filename.sav")
var/list/L = new()
for(var/V in F.dir)
L += V
if(L.len)
var/which = input(src, "Which dir would you like to delete?", "Delete") as null|anything in L
if(which)
F.Cut(which) // <---- something like this.
New directories may be created with savefile.dir.Add() and removed with savefile.dir.Remove().
In response to Jon88
Sweet. Thanks :)