public static void mergepath(storagenode node, string combinepath, bool brelative) { mergepath(ref node.nodedata.physicalpath, combinepath, brelative); foreach (var n in node.children) { mergepath(n, combinepath, brelative); } }
public static storagenode getstoragenode(string filename) { object[] objs = JSONPersister <object[]> .Read(filename); string buffer = JSONPersister <object> .GetJSON((object)objs[1]); storagenode node = JSONPersister <storagenode> .SetJSON(buffer); mergepath(node, Path.GetDirectoryName(filename), false); return(node); }
public static void write(string filename, container co, storagenode sn) { JSONPersister <object[]> .Write(filename, new object[] { co, sn }); }