I am trying to rename a TDirectory in an existing ROOT file. I have tried all of the obvious things (and then some): I can Get the directory into memory and rename it. However, Write() always returns “0” and nothing gets written to disk. Am I missing something here?
TFile f(“test.root”,“update”);
TDirectory T = (TDirectory)f.Get(“olddir”);
T->Write(“newdir”)
Write returns 0
f->ls("-m") shows my renamed directory
f->ls("-d") shows the old directory name